Shmidt
Shmidt

Reputation: 16674

Xcode 5 — wrong interface on a device with iOS7

My setting for the project:

When I run app in simulator(7.0) I see almost what I expect (I don't understand why barbuttons don't use color tint — on previous screen it shows blue): enter image description here

But if app is running on a device (also 7.0), Then I see: enter image description here As you can see this is some kind of iOS6 UI, but tableview goes under the navbar, which became transparent.

Why does it happen?

Upvotes: 1

Views: 242

Answers (2)

Shmidt
Shmidt

Reputation: 16674

I enabled Autolayout in IB, and now it uses iOS7 on a device too. Upd.: After some time it start show strange design again. It gone only after I set iOS7 as base and deployment SDK.

Upvotes: 0

Tarek Hallak
Tarek Hallak

Reputation: 18470

Behavior of tintColor for bars has changed on iOS 7.0, please check the image below:

enter image description here

So now to change the tint color for your bar buttons you need to use tintColor which is the color for the interactive elements within a navigation bar including button images and titles.

While barTintColor is the background color of the UINavigationBar.

So basically For buttons and title:

[[UINavigationBar appearance] setTintColor:[UIColor grayColor]];

For bar tint:

[[UINavigationBar appearance] setBarTintColor:[UIColor lightGrayColor]];

For the tableVIew under the navBar part, set navigationBar.translucent = NO;

Upvotes: 1

Related Questions