Popping to specific view controller (Objective-C)

I just wrote this piece of code for the project I’m currently working on.

You can use it if you know for sure that view controller of SpecificController class exists somewhere in the Navigation stack. Otherwise your app will crush when index goes down to -1.

 

Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *