When my view controllers appears, large navigation title is appearing. But when I scroll, then small navigation title is not appearing. I am facing this issue only in iOS 26. In older iOS versions, navigation title is working as expected.
- Tableview's top constraint is set to the UIViewController's View's top anchor (Superview).
- I also tried
navigationController?.navigationBar.prefersLargeTitles = trueandnavigationItem.largeTitleDisplayMode = .automatic, but it didn't work
My code:
override func viewDidLoad() {
super.viewDidLoad()
self.navigationItem.title = NSLocalizedString("profile", comment: "Profile")
let editButton = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: #selector(editButtonTapped))
navigationItem.rightBarButtonItem = editButton
tableViewProfile.estimatedRowHeight = UITableView.automaticDimension
tableViewProfile.rowHeight = UITableView.automaticDimension
}