I have updated my iPhone to iOS 7 today and recompile my app for it and all views in .xib files and on device are moved up and their upper part is hidden by the navigation bar. In my viewController
I set self.edgesForExtendedLayout = UIRectEdgeNone;
and on iOS 7 now everything looks good but when I compile my project with Deployment Target 6.0 and tested it on iOS 6 device all views are hidden by the navigation bar again.How can I make them to look consistently on iOS 7 and iOS 6 simultaneously? I don't want to break iOS 6 support now.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Xcode: Is there a way to change line spacing (UI L
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
Try using:
Add this value to your app plist: "View controller-based status bar appearance" and set it to "NO".
If you are using Interface Builder, I've had some luck with unchecking the setting for "extend edges" > "under top bars":
Works for me in iOS 7 and 6.
So here is what I did. It's not the cleanest code ever and you need to make sure you don't get weird results with your scroll views.
Basically I move down all of the subviews by the height of the navbar (45). For my scrollviews/tableviews, which in my app always go to the bottom of the screen, I reduce their height by 45 so that you can still reach the end. This is a solution for some apps, but you should make sure that all of your scroll and tableviews are intended to be shrunk like this.
Because it's not recursive, you don't need to worry about tableviews in scrollviews or anything like that.
Try this:
If you're using Storyboards in Interface Builder with Autolayout, you can add a constraint for the top of your view with the "Top Layout Guide"