i'm working on ios app based on https://github.com/stefanoa/saslidemenu (side menu classes) , storyboard.
on right menu i've connected button custom segue (saslidemenupushsegue). working fine in normal use if i'm tapping fast enough on button, can manage push more view.
for example, if m double tapping on button 2 views pushed. have no idea comes from. here segue code :
-(void) perform{ saslidemenurightmenuviewcontroller* source = self.sourceviewcontroller; saslidemenurootviewcontroller* root = source.rootcontroller; saslidemenunavigationcontroller* destination = self.destinationviewcontroller; [root pushrightnavigationcontroller:destination]; }
any idea of source of bug ? answer.
put bool ispressed
inside , check if button pressed before in particular class.
-(void) perform { if(!ispressed) { saslidemenurightmenuviewcontroller* source = self.sourceviewcontroller; saslidemenurootviewcontroller* root = source.rootcontroller; saslidemenunavigationcontroller* destination = self.destinationviewcontroller; [root pushrightnavigationcontroller:destination]; ispressed = yes; } }
and reset ispressed
. encountered same thing segue when presented popovercontroller
pressenting each time pressing button 1 on another,so think need handle behavior.
Comments
Post a Comment