Reputation: 263
iPhone project/iOS 7.1/objective-C Due to circumstances, i have presented a navigation controller which contains a view controller which in turn contains a web view.All of the before said are added programmatically (i.e. no .h,.m or xib files).How do i dismiss the navigation controller?
P.S: I've created all these in a method.There is no property or instance available for the navigationcontroller.
Upvotes: 0
Views: 3571
Reputation: 329
you have to create on barButtonItem
on navigation bar like "Back" or "Done" and on it's click event you should write :
[self dismissViewControllerAnimated:YES completion:nil];
Upvotes: 4