I am using navigation with a custom UIView subclass that becomes my titleView. I want to ensure this is the full available width.
Logically from my UIViewController's viewWillAppear:, this should be:
CGFloat width = self.width - self.navigationItem.leftBarButtonItem.width - someConstant;
(I don't have a right item here.)
This would adapt, then, for different possible widths of the leftBarButtonItem. The catch is that leftBarButtonItem is nil, so leftBarButtonItem.width is always 0 (well, in the simulator anyway).
backBarButtonItem is also nil.
What should I be doing instead?