ios - UITabBar disables when simulraneously click 2 buttons -


i have following "controller tree":

uitabbarcontroller
┣━ uiviewcontroller (a)
┃ ┗ mkmapview
┣━ uinavigationcontroller
┃ ┣━ uitableviewcontroller (x)
┃ ┗━ uitableviewcontroller (b)
┣━ uiviewcontroller (not interesting)
┗━ uiviewcontroller (not interesting)

in second view (b) have button connected ibaction:

- (ibaction)mapbuttontapped:(uibarbuttonitem *)sender {         uiview *startview = self.tabbarcontroller.selectedviewcontroller.view;         uiview *endview = ((uiviewcontroller *)[self.tabbarcontroller.viewcontrollers objectatindex:elmapviewcontrollerindex]).view;         elmainmapviewcontroller *carparkvc = [self.tabbarcontroller.viewcontrollers objectatindex:elmapviewcontrollerindex];         [uiview transitionfromview:startview toview:endview duration:elanimationduration                            options:uiviewanimationoptiontransitioncrossdissolve                         completion:^(bool finished) {                         }];     } 

the code has been taken from: iphone: how switch tabs animation?

everything works perfeclty fine - when button click on button second tab view slighty changes first , works want to.

unfortunately qa clicked simultaneously button , button connected function above. cause locking uitabbar. i'm able move mkmapview , subview uitabbar behave disabled user interaction.

if "combo" doesn't lock uitabbar cause "<" sign near button in b viewcontroller thinner should be.

i don't have idea how solve problem. checked viewwillappear , other function none of have deal uitabbar (i don't keep reference in other function uitabbar).

edit

i removed changing selected index in tabbar , issue still appears.

you need disable controls before starting animation re-enable them in completion block.

for each item use like:

[[[[self.tabbarcontroller tabbar] items] objectatindex:1] setenabled:no]; 

and setenabled:yes on animation completion.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -