Timur Mustafaev
Timur Mustafaev

Reputation: 4929

setTitleView strange behaviour in iOS 5 - objective-c

I try to set UILabel as titleView using [self.navigationItem setTitleView:musicArtist]; method, but it works strange with different iOS versions. UINavigationBar is in UIPopoverController. Here is iOS 4.3 screenshot:

enter image description here

As you can see it looks good. But when I switch iOS simulator at iOS 5.x I receive another result: enter image description here

UILabel AutioSize settings are:

enter image description here

And finally If I change UILabel AutoSizing to this:

enter image description here

I receive this result at both iOS versions:

enter image description here

Where could be the problem and how to get first result at all iOS versions?

Upvotes: 1

Views: 291

Answers (2)

Timur Mustafaev
Timur Mustafaev

Reputation: 4929

Problem solved when I've removed all AutoResizing settings.

Upvotes: 1

Jonathan Naguin
Jonathan Naguin

Reputation: 14786

Did you check to use the origin x and y like {0, 0}? In the screenshots you are using y=131 so when you attach it to titleView it will not show.

Upvotes: 0

Related Questions