Auto Layout with adaptive Layout editorUsing Auto Layout in UITableView for dynamic cell layouts & variable row heightsUnderstanding multiplier in auto layout to use relative positioningiOS get NSInvalidArgumentException when implementing Auto Layout programmaticallyUsing Auto Layout to define a potentially 0 valueRemove Ads Banner and can not make App becomes Full ScreenRelative layout. Constrain equation explanationIssues with casting celltypes to dequeuehaving trouble changing an auto layout constraintThe view hierarchy is not prepared for the constraint inside init with frame initializerChange a Storyboard Constraint Relation
Why do unstable nuclei form?
Number of possible integer values of x for which a certain expression is integer
Has magnetic core memory been used beyond the Moon?
What is the criteria of choosing a given pin pattern in ICs?
Windows OS quantum vs. SQL OS Quantum
We are two immediate neighbors who forged our own powers to form concatenated relationship. Who are we?
Is there an application which does HTTP PUT?
Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019
Cryptography and elliptic curves
When do you stop "pushing" a book?
Why was wildfire not used during the Battle of Winterfell?
Need help replacing old cassette and chain
Getting a error after using setState with a promise
How to compare d20+x with advantage to d20+y without advantage (x < y)
Why did they go to Dragonstone?
How is CoreiX like Corei5, i7 is related to Haswell, Ivy Bridge?
Passport stamps art, can it be done?
Two researchers want to work on the same extension to my paper. Who to help?
How are one-time password generators like Google Authenticator different from having two passwords?
Improving Sati-Sampajañña (situative wisdom)
Succinct and gender-neutral Russian word for "writer"
Pre-1993 comic in which Wolverine's claws were turned to rubber?
spatiotemporal regression
No such column 'DeveloperName' on entity 'RecordType' after Summer '19 release on sandbox
Auto Layout with adaptive Layout editor
Using Auto Layout in UITableView for dynamic cell layouts & variable row heightsUnderstanding multiplier in auto layout to use relative positioningiOS get NSInvalidArgumentException when implementing Auto Layout programmaticallyUsing Auto Layout to define a potentially 0 valueRemove Ads Banner and can not make App becomes Full ScreenRelative layout. Constrain equation explanationIssues with casting celltypes to dequeuehaving trouble changing an auto layout constraintThe view hierarchy is not prepared for the constraint inside init with frame initializerChange a Storyboard Constraint Relation
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
As you can see in the photo, the objects on the iPhone6 are at the bottom, but they are not at the bottom of the iPhone XS Max.
How do I place these objects automatically for each phone?
I have shared my code to edit the labelcircleBox. For example, how do I perform Auto Layout on this label?
iPhone 6
iPhone XS max
I think we can solve this problem with Width-Regular, Height-Compact
view.addSubview(labelcircleBox)
labelcircleBox = "Cihazı Güncellemek için Tıklayınız"
// labelcircleBox.topAnchor.constraint(equalTo: view.topAnchor, constant: 630).isActive = true
labelcircleBox.widthAnchor.constraint(equalTo: view.widthAnchor, constant: 20).isActive = true
// labelcircleBox.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 15).isActive = true
labelcircleBox.heightAnchor.constraint(equalToConstant: 40).isActive = true
let horConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerX, relatedBy: .equal, toItem: view, attribute: .centerX, multiplier: 1.0, constant: 0.0)
let verConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerY, relatedBy: .equal, toItem: view, attribute: .centerY, multiplier: 1.0, constant: 245.0)
view.addConstraints([horConstraint, verConstraint])
How can do I automatically edit layout according to iPhone phone
models?
swift autolayout
add a comment |
As you can see in the photo, the objects on the iPhone6 are at the bottom, but they are not at the bottom of the iPhone XS Max.
How do I place these objects automatically for each phone?
I have shared my code to edit the labelcircleBox. For example, how do I perform Auto Layout on this label?
iPhone 6
iPhone XS max
I think we can solve this problem with Width-Regular, Height-Compact
view.addSubview(labelcircleBox)
labelcircleBox = "Cihazı Güncellemek için Tıklayınız"
// labelcircleBox.topAnchor.constraint(equalTo: view.topAnchor, constant: 630).isActive = true
labelcircleBox.widthAnchor.constraint(equalTo: view.widthAnchor, constant: 20).isActive = true
// labelcircleBox.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 15).isActive = true
labelcircleBox.heightAnchor.constraint(equalToConstant: 40).isActive = true
let horConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerX, relatedBy: .equal, toItem: view, attribute: .centerX, multiplier: 1.0, constant: 0.0)
let verConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerY, relatedBy: .equal, toItem: view, attribute: .centerY, multiplier: 1.0, constant: 245.0)
view.addConstraints([horConstraint, verConstraint])
How can do I automatically edit layout according to iPhone phone
models?
swift autolayout
In this code you appear to be constraining yourlabelcircleBoxto the centre ofviewbut there is no indication of whatviewactually is. You don't need to take note of the devices themselves you need to constrain your views to the bottom of the safe area (or bottom layout margin).
– Upholder Of Truth
Mar 23 at 9:53
add a comment |
As you can see in the photo, the objects on the iPhone6 are at the bottom, but they are not at the bottom of the iPhone XS Max.
How do I place these objects automatically for each phone?
I have shared my code to edit the labelcircleBox. For example, how do I perform Auto Layout on this label?
iPhone 6
iPhone XS max
I think we can solve this problem with Width-Regular, Height-Compact
view.addSubview(labelcircleBox)
labelcircleBox = "Cihazı Güncellemek için Tıklayınız"
// labelcircleBox.topAnchor.constraint(equalTo: view.topAnchor, constant: 630).isActive = true
labelcircleBox.widthAnchor.constraint(equalTo: view.widthAnchor, constant: 20).isActive = true
// labelcircleBox.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 15).isActive = true
labelcircleBox.heightAnchor.constraint(equalToConstant: 40).isActive = true
let horConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerX, relatedBy: .equal, toItem: view, attribute: .centerX, multiplier: 1.0, constant: 0.0)
let verConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerY, relatedBy: .equal, toItem: view, attribute: .centerY, multiplier: 1.0, constant: 245.0)
view.addConstraints([horConstraint, verConstraint])
How can do I automatically edit layout according to iPhone phone
models?
swift autolayout
As you can see in the photo, the objects on the iPhone6 are at the bottom, but they are not at the bottom of the iPhone XS Max.
How do I place these objects automatically for each phone?
I have shared my code to edit the labelcircleBox. For example, how do I perform Auto Layout on this label?
iPhone 6
iPhone XS max
I think we can solve this problem with Width-Regular, Height-Compact
view.addSubview(labelcircleBox)
labelcircleBox = "Cihazı Güncellemek için Tıklayınız"
// labelcircleBox.topAnchor.constraint(equalTo: view.topAnchor, constant: 630).isActive = true
labelcircleBox.widthAnchor.constraint(equalTo: view.widthAnchor, constant: 20).isActive = true
// labelcircleBox.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 15).isActive = true
labelcircleBox.heightAnchor.constraint(equalToConstant: 40).isActive = true
let horConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerX, relatedBy: .equal, toItem: view, attribute: .centerX, multiplier: 1.0, constant: 0.0)
let verConstraint = NSLayoutConstraint(item: labelcircleBox, attribute: .centerY, relatedBy: .equal, toItem: view, attribute: .centerY, multiplier: 1.0, constant: 245.0)
view.addConstraints([horConstraint, verConstraint])
How can do I automatically edit layout according to iPhone phone
models?
swift autolayout
swift autolayout
edited Mar 23 at 14:59
Mike Hay
2,5591626
2,5591626
asked Mar 23 at 9:35
uaberkoouaberkoo
196
196
In this code you appear to be constraining yourlabelcircleBoxto the centre ofviewbut there is no indication of whatviewactually is. You don't need to take note of the devices themselves you need to constrain your views to the bottom of the safe area (or bottom layout margin).
– Upholder Of Truth
Mar 23 at 9:53
add a comment |
In this code you appear to be constraining yourlabelcircleBoxto the centre ofviewbut there is no indication of whatviewactually is. You don't need to take note of the devices themselves you need to constrain your views to the bottom of the safe area (or bottom layout margin).
– Upholder Of Truth
Mar 23 at 9:53
In this code you appear to be constraining your
labelcircleBox to the centre of view but there is no indication of what view actually is. You don't need to take note of the devices themselves you need to constrain your views to the bottom of the safe area (or bottom layout margin).– Upholder Of Truth
Mar 23 at 9:53
In this code you appear to be constraining your
labelcircleBox to the centre of view but there is no indication of what view actually is. You don't need to take note of the devices themselves you need to constrain your views to the bottom of the safe area (or bottom layout margin).– Upholder Of Truth
Mar 23 at 9:53
add a comment |
1 Answer
1
active
oldest
votes
How can do I automatically edit layout according to iPhone phone models?
You don't. You make one layout that works for all phone models. That is what auto layout is.
How do I place these objects automatically for each phone?
By placing them in relation to the boundaries of the phone. For example, if you want something to appear "at the bottom" for all phones, constrain its bottom to the bottom of the safe area.
although I do not receive reference with bottom, the top side is reference.
– uaberkoo
Mar 25 at 9:45
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%2f55312405%2fauto-layout-with-adaptive-layout-editor%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
How can do I automatically edit layout according to iPhone phone models?
You don't. You make one layout that works for all phone models. That is what auto layout is.
How do I place these objects automatically for each phone?
By placing them in relation to the boundaries of the phone. For example, if you want something to appear "at the bottom" for all phones, constrain its bottom to the bottom of the safe area.
although I do not receive reference with bottom, the top side is reference.
– uaberkoo
Mar 25 at 9:45
add a comment |
How can do I automatically edit layout according to iPhone phone models?
You don't. You make one layout that works for all phone models. That is what auto layout is.
How do I place these objects automatically for each phone?
By placing them in relation to the boundaries of the phone. For example, if you want something to appear "at the bottom" for all phones, constrain its bottom to the bottom of the safe area.
although I do not receive reference with bottom, the top side is reference.
– uaberkoo
Mar 25 at 9:45
add a comment |
How can do I automatically edit layout according to iPhone phone models?
You don't. You make one layout that works for all phone models. That is what auto layout is.
How do I place these objects automatically for each phone?
By placing them in relation to the boundaries of the phone. For example, if you want something to appear "at the bottom" for all phones, constrain its bottom to the bottom of the safe area.
How can do I automatically edit layout according to iPhone phone models?
You don't. You make one layout that works for all phone models. That is what auto layout is.
How do I place these objects automatically for each phone?
By placing them in relation to the boundaries of the phone. For example, if you want something to appear "at the bottom" for all phones, constrain its bottom to the bottom of the safe area.
answered Mar 23 at 15:38
mattmatt
340k48554754
340k48554754
although I do not receive reference with bottom, the top side is reference.
– uaberkoo
Mar 25 at 9:45
add a comment |
although I do not receive reference with bottom, the top side is reference.
– uaberkoo
Mar 25 at 9:45
although I do not receive reference with bottom, the top side is reference.
– uaberkoo
Mar 25 at 9:45
although I do not receive reference with bottom, the top side is reference.
– uaberkoo
Mar 25 at 9:45
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%2f55312405%2fauto-layout-with-adaptive-layout-editor%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
In this code you appear to be constraining your
labelcircleBoxto the centre ofviewbut there is no indication of whatviewactually is. You don't need to take note of the devices themselves you need to constrain your views to the bottom of the safe area (or bottom layout margin).– Upholder Of Truth
Mar 23 at 9:53