2

I have a custom UIView under a UINavigationBar. When I run the app in iOS 6, the UIView is visible but its not in iOS 7. Both UIView and UINavigationBar are driven by its own controllers and are nowhere linked to each other.

After doing some investigation, I found 2 solutions for this issue:

  • Set the translucent property for UINavigationBar to NO (since its now YES by default in ios 7)
  • customUIViewController.edgesForExtendedLayout = UIRectEdgeNone

Of these, 1st solution works both in ios 6 and 7; and 2nd solution just works in ios 7 because the method name its values are renamed in ios 7.

Has anybody else faced similar issue? I am trying to understand why this is happening or how does the translucent property of the NavigationBar affect the custom UIView?

tech_human
  • 6,592
  • 16
  • 65
  • 107
  • iOS 7 brings several changes to how you lay out and customize the appearance of your UI. The changes in view-controller layout, tint color and font affect all the UIKit objects in your app. Please refer my answer posted in http://stackoverflow.com/questions/17074365/status-bar-and-navigation-bar-appear-over-my-views-bounds-in-ios-7/18785646#18785646 – Nandha Sep 17 '13 at 07:27

0 Answers0