iphone - iOS: Unwind back in a chain of modal segues -


i have user registration process separated out 3 screens. first screen has user enter mobile number, second screen asks him select location & third screen asks him enter birthday , few other details.

so in total, there totally 3 controllers have used , presented in below order.

1) mobile_number_controller.rb 2) location_controller.rb 3)miscellaneous_details_controller.rb

so present chain of controllers using modal segues result of discussion here. right kind of confused on unwinding back. questions have in mind

1) possible unwind controller in chain of presenting controllers not controller directly presented current controller, i.e miscellaneous_details_controller mobile_number_controller? if possible right way so?

2) if 1) possible, happen other controllers in chain, i.e controllers between current controller , presenting controller in chain unwinding now, i.e, location_controller? have manually dismiss controllers 1 one , do that?

please suggest on rightful ways approach problem. of great use starting of ios development.

the easiest way not use unwind segue @ all. call dismissviewcontrolleranimated:completion:, sending to view controller instance want wind to. cause presented view controllers removed way 1 sent to.

you can figure out view controller because there chain of presentingviewcontroller objects running way it. in other words, go 1 step, say:

[self.presentingviewcontroller dismissviewcontrolleranimated:yes completion:nil]; 

to go 2 steps, say:

[self.presentingviewcontroller.presentingviewcontroller dismissviewcontrolleranimated:yes completion:nil]; 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -