sagarkothari
sagarkothari

Reputation: 24820

NSAutoLayoutContraint for iPhone 6Plus

Following is an image from iPhone6 having a simple view.

Constraint details are as follows.

Constraint Details

iPhone6

But on iPhone 6 Plus, It starts getting margins from left & right. Very easy to notice by looking at space before text 'Carrier' & space after battery icon in given images.

iPhone 6Plus

Question 1: Why do we add -16 as margin to leading and trailing space when adding a constraint to main/parent/super view?

Question 2: Why -16 margin works only for iPhone 6Plus & not for other phones?

Upvotes: 0

Views: 82

Answers (2)

Vikash Kumar
Vikash Kumar

Reputation: 3

uncheck the "Constrain to margin" from constraint selection because this is a new feature of iOS8.

Upvotes: 0

las
las

Reputation: 288

Unselected Constrain to margin when you set your constraints

enter image description here

Upvotes: 2

Related Questions