ios - Resigning Modal View with 2 different segues -
currently have uibarbutton says done in viewcontroller 2. present viewcontroller2 viewcontroller 1 modally through segue defined in storyboard. have viewcontroller3 presents viewcontroller2 modally well.
the question: how can define 2 different segues resign viewcontroller2 modally either vc1 or vc3?
after further research, seems defining unwindtoviewcontroller in vc1 , vc3 best way go. however, there way call ibaction before modal view unwinds?
@implementation redviewcontroller - (ibaction)unwindtored:(uistoryboardsegue *)unwindsegue { } @end
modalview .m
-(ibaction)actionbeforeunwinding:(id)sender { }
why not dismissing presentingviewcontroller?
- (ibaction)unwindtored:(id)sender { [self.presentingviewcontroller dismissviewcontrolleranimated:yes completion:nil]; }
Comments
Post a Comment