In iOS 12 and before I can do below to customized album's first page's title.
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
viewController.title = "customized title!!"
}
But it's not working at iOS 13 any more. Is there anyone could help me for customized that?
You can go with this code :-
func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {
viewController.navigationItem.title = "customized title"
}
You can try with following code:
func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {
self.navigationItem.title = "customized title"
}
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.