Calculate percentage-base constraints in XcodeHow can foreign key constraints be temporarily disabled using T-SQL?How do I animate constraint changes?iOS Xcode fill background image based on percentageToday Extension height for iPad much larger than specifiedXcode error “Could not find Developer Disk Image”ios Auto Layout Constraint IssueAutolayout Constraint with multiple LabelsMake Vertical Space Constraint Constant equal to percentage of screen heightHow can I set AutoLayout constraints' constant as a percentage of the superview?Constraints working on iPhone 8 but not on iPhone 8 Plus
Is it legal for company to use my work email to pretend I still work there?
Why do bosons tend to occupy the same state?
Is it possible to create light that imparts a greater proportion of its energy as momentum rather than heat?
How to draw the figure with four pentagons?
How can I make my BBEG immortal short of making them a Lich or Vampire?
How is it possible to have an ability score that is less than 3?
What do you call someone who asks many questions?
Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?
I would say: "You are another teacher", but she is a woman and I am a man
What is going on with Captain Marvel's blood colour?
Blender 2.8 I can't see vertices, edges or faces in edit mode
Assassin's bullet with mercury
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
How can saying a song's name be a copyright violation?
Why can't we play rap on piano?
AES: Why is it a good practice to use only the first 16bytes of a hash for encryption?
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
What reasons are there for a Capitalist to oppose a 100% inheritance tax?
What's the point of deactivating Num Lock on login screens?
In Romance of the Three Kingdoms why do people still use bamboo sticks when paper had already been invented?
I Accidentally Deleted a Stock Terminal Theme
Would Slavery Reparations be considered Bills of Attainder and hence Illegal?
How to model explosives?
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
Calculate percentage-base constraints in Xcode
How can foreign key constraints be temporarily disabled using T-SQL?How do I animate constraint changes?iOS Xcode fill background image based on percentageToday Extension height for iPad much larger than specifiedXcode error “Could not find Developer Disk Image”ios Auto Layout Constraint IssueAutolayout Constraint with multiple LabelsMake Vertical Space Constraint Constant equal to percentage of screen heightHow can I set AutoLayout constraints' constant as a percentage of the superview?Constraints working on iPhone 8 but not on iPhone 8 Plus
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have just started an iOS project. I really want to add ALL constraints in percentage, not points, to have exactly the same sizes in all iOS devices.
For example, the point-based constraint between an item leading to superview.leading is 20.
Since in iPhone Xs Max, the total width is 414 points.
In the constraint section, should I define these values:
X.leading
equal
superview.leading
constant: 0
Priority: 1000
Multiplier: 20/414 = 0.0483
Is it the right way to do that?
ios constraints
add a comment |
I have just started an iOS project. I really want to add ALL constraints in percentage, not points, to have exactly the same sizes in all iOS devices.
For example, the point-based constraint between an item leading to superview.leading is 20.
Since in iPhone Xs Max, the total width is 414 points.
In the constraint section, should I define these values:
X.leading
equal
superview.leading
constant: 0
Priority: 1000
Multiplier: 20/414 = 0.0483
Is it the right way to do that?
ios constraints
add a comment |
I have just started an iOS project. I really want to add ALL constraints in percentage, not points, to have exactly the same sizes in all iOS devices.
For example, the point-based constraint between an item leading to superview.leading is 20.
Since in iPhone Xs Max, the total width is 414 points.
In the constraint section, should I define these values:
X.leading
equal
superview.leading
constant: 0
Priority: 1000
Multiplier: 20/414 = 0.0483
Is it the right way to do that?
ios constraints
I have just started an iOS project. I really want to add ALL constraints in percentage, not points, to have exactly the same sizes in all iOS devices.
For example, the point-based constraint between an item leading to superview.leading is 20.
Since in iPhone Xs Max, the total width is 414 points.
In the constraint section, should I define these values:
X.leading
equal
superview.leading
constant: 0
Priority: 1000
Multiplier: 20/414 = 0.0483
Is it the right way to do that?
ios constraints
ios constraints
edited Mar 8 at 0:34
rmaddy
246k27327390
246k27327390
asked Mar 8 at 0:24
RouzbehRouzbeh
165
165
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Don't use it. percentage-base constraints in Xcode is not intuitive at all.
as for iPhone Xs Max , use safe area
.
For apps with custom layouts, supporting iPhone X should also be
relatively easy, especially if your app uses Auto Layout and adheres
to safe area and margin layout guides.
Read more: https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/
The problem is, the point-base constrains is not the same for the biggest iPhone (Xs Max) and the smallest one (SE). For example, 50 points in XS max is much smaller than it on iPhone SE
– Rouzbeh
Mar 8 at 0:44
So what is fixed. for example a label's width is the same for various iPhone. then the anchor the label . use leading center stackView, etc.
– dengApro
Mar 8 at 0:55
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054971%2fcalculate-percentage-base-constraints-in-xcode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Don't use it. percentage-base constraints in Xcode is not intuitive at all.
as for iPhone Xs Max , use safe area
.
For apps with custom layouts, supporting iPhone X should also be
relatively easy, especially if your app uses Auto Layout and adheres
to safe area and margin layout guides.
Read more: https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/
The problem is, the point-base constrains is not the same for the biggest iPhone (Xs Max) and the smallest one (SE). For example, 50 points in XS max is much smaller than it on iPhone SE
– Rouzbeh
Mar 8 at 0:44
So what is fixed. for example a label's width is the same for various iPhone. then the anchor the label . use leading center stackView, etc.
– dengApro
Mar 8 at 0:55
add a comment |
Don't use it. percentage-base constraints in Xcode is not intuitive at all.
as for iPhone Xs Max , use safe area
.
For apps with custom layouts, supporting iPhone X should also be
relatively easy, especially if your app uses Auto Layout and adheres
to safe area and margin layout guides.
Read more: https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/
The problem is, the point-base constrains is not the same for the biggest iPhone (Xs Max) and the smallest one (SE). For example, 50 points in XS max is much smaller than it on iPhone SE
– Rouzbeh
Mar 8 at 0:44
So what is fixed. for example a label's width is the same for various iPhone. then the anchor the label . use leading center stackView, etc.
– dengApro
Mar 8 at 0:55
add a comment |
Don't use it. percentage-base constraints in Xcode is not intuitive at all.
as for iPhone Xs Max , use safe area
.
For apps with custom layouts, supporting iPhone X should also be
relatively easy, especially if your app uses Auto Layout and adheres
to safe area and margin layout guides.
Read more: https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/
Don't use it. percentage-base constraints in Xcode is not intuitive at all.
as for iPhone Xs Max , use safe area
.
For apps with custom layouts, supporting iPhone X should also be
relatively easy, especially if your app uses Auto Layout and adheres
to safe area and margin layout guides.
Read more: https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/
answered Mar 8 at 0:35
dengAprodengApro
1,16911324
1,16911324
The problem is, the point-base constrains is not the same for the biggest iPhone (Xs Max) and the smallest one (SE). For example, 50 points in XS max is much smaller than it on iPhone SE
– Rouzbeh
Mar 8 at 0:44
So what is fixed. for example a label's width is the same for various iPhone. then the anchor the label . use leading center stackView, etc.
– dengApro
Mar 8 at 0:55
add a comment |
The problem is, the point-base constrains is not the same for the biggest iPhone (Xs Max) and the smallest one (SE). For example, 50 points in XS max is much smaller than it on iPhone SE
– Rouzbeh
Mar 8 at 0:44
So what is fixed. for example a label's width is the same for various iPhone. then the anchor the label . use leading center stackView, etc.
– dengApro
Mar 8 at 0:55
The problem is, the point-base constrains is not the same for the biggest iPhone (Xs Max) and the smallest one (SE). For example, 50 points in XS max is much smaller than it on iPhone SE
– Rouzbeh
Mar 8 at 0:44
The problem is, the point-base constrains is not the same for the biggest iPhone (Xs Max) and the smallest one (SE). For example, 50 points in XS max is much smaller than it on iPhone SE
– Rouzbeh
Mar 8 at 0:44
So what is fixed. for example a label's width is the same for various iPhone. then the anchor the label . use leading center stackView, etc.
– dengApro
Mar 8 at 0:55
So what is fixed. for example a label's width is the same for various iPhone. then the anchor the label . use leading center stackView, etc.
– dengApro
Mar 8 at 0:55
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054971%2fcalculate-percentage-base-constraints-in-xcode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown