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;








-1















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?











share|improve this question
























  • 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

















-1















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?











share|improve this question
























  • 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













-1












-1








-1








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?











share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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
















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












1 Answer
1






active

oldest

votes


















0















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.






share|improve this answer























  • although I do not receive reference with bottom, the top side is reference.

    – uaberkoo
    Mar 25 at 9:45











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
);



);













draft saved

draft discarded


















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









0















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.






share|improve this answer























  • although I do not receive reference with bottom, the top side is reference.

    – uaberkoo
    Mar 25 at 9:45















0















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.






share|improve this answer























  • although I do not receive reference with bottom, the top side is reference.

    – uaberkoo
    Mar 25 at 9:45













0












0








0








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.






share|improve this answer














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.







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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



















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해