2

I am having a very weird problem for iPad's multi-tasking resizing. This is how i set up my titleView:

navigationItem.titleView = theView

And I resize the SplitView in iPad multi-tasking so I can have two apps running side by side. After a few size changing, my titleview is missing from the UI.

Debugging it from the log, it is still in the navigationItem's titleview hierarchy but just not showing?

Any ideas?

tzuer
  • 321
  • 4
  • 12

2 Answers2

1

I am having the exact same issue and have yet to find a resolution. When using the title property it works great, but using titleView the view will disappear at times when changing sizes when multitasking.

outerstorm
  • 712
  • 3
  • 7
  • 16
0

I found the following seems to have fixed my issue:

Assuming the view you want to place as the title view on the navigation item is declared as self.titleView:

[self.titleView.widthAnchor constraintEqualToConstant:44.0].active = true;

Hope that helps anyone else looking for the same thing.

I found this via this article:

Custom title view as large title in iOS 11 new navigation bar

General Grievance
  • 4,555
  • 31
  • 31
  • 45
iOS4Life
  • 226
  • 2
  • 13