Search code examples
cocoa-touchuinavigationbarios6uiappearance

iOS - UINavigationBar transparent corners not all the time


I'm using a custom UINavigationBar which has transparent corners in the upper left and upper right. I'm using [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navbar.png"] forBarMetrics:UIBarMetricsDefault];

This works great almost all the time but sometimes for instance when I show the keyboard instead of the transparent corners they become white, and when the keyboard slides back the corners go transparent again.

Does anyone have a clue what could cause this? (iOS 6, ARC)


Solution

  • I think I know the cause of it. When I show the keyboard I slide my UITableView up. So I believe it is the UITableViews background that is showing behind the navigation bar. But I would think that the navigation bar wouldn't be affected of that?