简体   繁体   中英

How twitter ios app is doing to push the profile page with a new UINavigationController

I wondering how Twiter is doing, in the ios app, to push a profile viewController with a new navbar or a new navigationController above the current viewController ?

在此输入图像描述

In your stoyboard you have your UITabBarController connected to the UIUserController. Embed a UINavigationController between them and you get the desired result.

The UINavigationController is probably the same. What seems to be a custom navigation bar is actually a transparent navigation bar and a UIView coming from the top behind it.

You will need to hide the Navigation bar in viewWillAppear and show it for the pushed view controller

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(true)
    self.navigationController?.setNavigationBarHidden(true, animated: true)
}

override func viewWillDisappear(_ animated: Bool) {
    super.viewWillDisappear(true)
    self.navigationController?.setNavigationBarHidden(false, animated: true)
}

explanation can be found 👇

https://medium.com/@qbo/push-page-with-without-navigation-bar-eb3cea35178d

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