suppose have 3 view controllers. initiate vc1 in vc0 , vc2 in vc1. want vc2 dismissed , after vc0 should shown behind it. how's possible? read delegate declaration. couldn't understand.
i have uisegmentcontrol i'm displaying controller storyboard - vc0 = [self.storyboard instantiateviewcontrollerwithidentifier=@"vc0"]; , making subview of [self.view addsubview:vc0.view]; vc0 tableview, has detailcontroller presented. when tap on cell, shows detailview, actual segmentcontrol.view lost when detailview dismissed.
an example awesome.
ps: i'm not using segue viewcontrollers. instead, i'm using presentmodalviewcontroller , dismissmodalviewcontroller.
in ios 5 need do
[self.presentingviewcontroller.presentingviewcontroller dismissmodalviewcontrolleranimated:yes]
as of ios 6 dismissmodalviewcontrolleranimated: deprecated.
you need call
[self.presentingviewcontroller.presentingviewcontroller dismissviewcontrolleranimated:yes completion:^{ // on completion}] //if want perform while going through views or other wise keep completion nil shown in below code.
or
[self.presentingviewcontroller.presentingviewcontroller dismissviewcontrolleranimated:yes completion:nil];
or
[self.parentviewcontroller.parentviewcontroller dismissmodalviewcontrolleranimated:yes];
Comments
Post a Comment