Warning frame for Navigation bar will be different at run time appears in Xcode 8 Swift 3
Warning will disappear if you change the property "Simulated Size" to "Freeform".
Xcode 8 Frame for Navigation Bar will be different at run time error
Warning will disappear if you change the property "Simulated Size" to "Freeform".
Frame for will be different at run time in swift
Your constraints are probably set correctly, since you're getting just a warning.
Go to your Storyboard an look in your Document Outline for the yellow triangle
Click on it so that it displays all Misplaced views
Make sure that Update frames is selected and click fix misplacement (you can also check the "Apply to all views in container" if you have lot of misplaced views and want to reposition it in single click)
Xcode 8 / Swift 3 / ios 10 navigation bar changes?
Through some insane trial and error in viewDidLoad() I found why this error occurs:
If I create the button with an empty title I get the problem, i.e. like this:
outletCatalogNav.leftbarButtonItem = UIBarButtonItem(title: "", style: UIBarButtonItemStyle.plain, target: self, action: #selector(ownCatalogBackButton));
Create with a non-empty title and it works:
outletCatalogNav.leftbarButtonItem = UIBarButtonItem(title: "test", style: UIBarButtonItemStyle.plain, target: self, action: #selector(ownCatalogBackButton));
In both cases the title is actually also set later - but what matters is having a non-empty title when creating the button.
Copied a View to a project with Navigation Controller - Frame for Image View will be different at run time
Select the UIImageView
and click [-o-] icon, then choose Reset To Suggested Constraints menu item.
Simulated metrics section does nothing in the runtime, it only us to figure out how layout will look like before compiling.
Also there is one more (better) approach, but you have to analyse what constraints UIImageView
has and change them accordingly for new layout (with added nav bar). You can try to post screenshot with those constraints here, so we can help you to figure out what happened. Go to Size Inspector in right panel and show us Constraints section.
UPDATE
Your constraints force UIImageView
to have the same horizontal align as labels below have and the same width. Plus you have constraints for fixed vertical space from the topmost label and navigation bar, width of UIImageView
depends on available space between nav bar and labels. I think it's good solution for current layout (without scrolling), because everything will fit into the screen for both 3.5" and 4" inch displays. In case you want different behaviour let me know in a comments.
How to Remove the Warning Frame for Button will be different at run time.
Probably you have created a conflict in constraints. To resolve it
Open nib file Go to editor > Resolve all constraint issues> from there you can reset all/desired constraints.
Related Topics
Find Attributes from Attributed String That User Typed
What Impact Does Simulated Metrics Have
Create and Perform Segue Without Storyboards
How to Save List of Object in User Default
Swift - How to Create Sort Query as Descending on Firebase
How to Print Boolean Flag in Nslog
Error: Cuicatalog: Invalid Asset Name Supplied: (Null), or Invalid Scale Factor:2.000000
How to Detect That the App Is Running on a Jailbroken Device
Front Facing Camera in Uiimagepickercontroller
Google Maps iOS Sdk, Getting Directions Between 2 Locations
Cocoapods Could Not Find Compatible Versions for Pod "Firebase/Core" | Cloud_Firestore, Flutter
Push Notifications Not Being Received on iOS 10, But Working on iOS 9 and Before
Decrease the Width of the Last Line in Multiline Uilabel
iOS Navigation Bar Item Image Size
The Default App Has Not Been Configured Yet
How to Remove Special Characters from String in Swift 2
My Swift 4 Uiscrollview with Autolayout Constraints Is Not Scrolling