I have a custom titleView that I need to set the max width for. That would be the screen width - width of left item (back title, button or nil) - width of right item (button or nil). How can I determine this?
Thanks.
_segmentedControl.frame = CGRectMake(0, 0, CGFLOAT_MAX, _segmentedControl.frame.size.height);
[self.navigationItem setTitleView:_segmentedControl];
Setting CGFLOAT_MAX as width for the navigationItem title view use the maximum space available between the left item and the right item.