简体   繁体   中英

How to dismiss modal uitabbarcontroller from its own child view controller

My viewControllerOne modally present a uitabbarcontroller which have 5 tabs. On fifth tab I have resetViewController which is obviously the child of uitabbarcontroller.

How to dismiss the modally presented uitabbarcontroller from its own child viewcontroller ( resetViewController ) .

Since it was the tab bar controller that was presented, it will have a reference to the presenting view controller, so if you have the tab bar controller do the dismissal, it should forward that message to viewControllerOne. Try this:

[self.tabBarController dismissViewControllerAnimated:YES completion:nil];

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