简体   繁体   中英

popping to root view in navigation controller

I have one navigation controller with three views. I push the three view controllers onto the navigation controller's stack and want to pop all the pushed view controllers at once by the click on a button. I would like to be able to do that from any pushed view controller...

Please can you help me and give me pointers on how I could do that?

[self.navigationController popToRootViewControllerAnimated:YES];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM