Xcode 6 beta 7: storyboard adds extra space on right and left sides
iOS 8 adds the concept of “content margins” to UIView
. The “What's New in Cocoa Touch” video from WWDC 2014 discusses content margins (under the title “Adaptive Margins”) starting at about 12m30s.
The default margins are 8 points on each side. Each end of a layout constraint can be relative to a view's margin instead of to the view's true edge (use File > Open Quickly to go to the definition of NSLayoutAttribute
to see the possibilities).
Your constraint is “relative to margin”. When you create the constraint with the “Add New Constraints” popover, you can choose whether it's margin-relative or not:
It always defaults to margin-relative; you have to turn the checkbox off every time you add constraints if you don't want them to be margin-relative.
You can't change whether a constraint is margin-relative in the quick-edit popover of your screen shot. Instead, double-click the constraint to bring up its full Attributes inspector. There, you can use the popup menus to select, for each end of the constraint, whether it's margin-relative or not:
Xcode 6 Interface Builder view is sized wrong
You've created constraints to the margins of the superview, not its edges. The edge of the view is 16 points from the margin.
This is new in Xcode 6. You can change this by altering the individual constraints (where it says the "item" as superview.margin or similar, in the attributes inspector) or by creating the constraints with the "use margins" box unchecked.
iOS autolayout changes leading and trailing space
Double click the constraint and open it. There select first or second item and deselect "Relative to margin". Then set your constant as 0.
Xcode is showing -16 because it is calculating space with respect to a margin and not the edges.
Check following link for more info on margins. Editing Auto Layout Constraints
Auto Layout in Xcode 6 - Pinning view to edge of parent view creates -8 constraint
Before you add a new constraint, you will need to untick the "Constain to Margins". It is ticked by default.
Related Topics
Xcode Won't Let to Build for Device After Denying Codesign to Access Keychain
How to Convert Including Timezone Date in Swift
Why Tesseract Ocr Library (Ios) Cannot Recognize Text at All
Fbsession: an Attempt Was Made Reauthorize Permissions on an Unopened Session
Load Image from Bundle with iOS
How to Get iOS Appstorereceipturl into Base 64 Encoded String
What Does Warning "Mapping Architecture Arm64 to X86_64" Mean
How to Set-Up in App Purchase Free Trial Period in iOS App
How to Get Image File Size in Swift
To Create a New Uiwindow Over the Main Window
Does iOS Provide Built in Text to Speech Support or Any Class Like Nsspeechrecognizer
Disable the Uitableview Highlighting But Allow the Selection of Individual Cells
"The Data Couldn't Be Read Because It Is Missing" Error When Decoding JSON in Swift
New React Native Project with Old Version of React Native
Bsxpcmessage Received Error for Message: Connection Interrupted