Why is the simulator using the size class in which I left the interface builder at for some specific elements...

Multi tool use
I have size classes defined for iPad and iPhones. I'm using Xcode 10.1 with latest Swift 4.2 on Mojave 10.14.1. I was testing on iOS 11.0.1 and 12.1 simulators but no difference.
If I use an iPhone device in the interface builder, and then run on iPad, it will display the grid using the iPhone size class despite having an already defined size for iPad. This leads to constraint warnings in the console. The iPad size class (R, R) has the width/height defined at 100, but the console states that the active constraint is 60, which is the default. Why is it ignoring the size class?
If I use an iPad device in the interface builder, and then run on iPad, it will display the grid correctly using the iPad size class. No constraint warnings.
If I use an iPad device in the interface builder, and then run on an iPhone, it will display the grid using the iPad size class despite having an already defined size for iPhone. This leads to constraint warnings in the console. The iPhone size class has the default width/height of 60, and the console states that the active constraint is 60 and will break it to use the iPad size of 100. Why is it using 100 when it's not even the correct size class?
If I use an iPhone device in the interface builder and then run on an iPhone, it displays the grid correctly using the iPhone size class. No constraint warnings.
The worse part is that there are other elements also defined by size classes except those are not affected; only these buttons.
This is how the settings look for the affected buttons.
I even tried adding repetitive values for iPhones but no difference. They are ignored and it's using the iPad (R, R) class if I leave the interface builder with an iPad device.
I can reproduce the same invalid scenarios on my iPhone, so it seems it is not just the simulators. I am not using any programmatic code at all. I have deleted derived data, reset simulators, close/reopen Xcode, clean build folder, delete/re-add constraints, but no difference.
ios ios-autolayout xcode10 size-classes
add a comment |
I have size classes defined for iPad and iPhones. I'm using Xcode 10.1 with latest Swift 4.2 on Mojave 10.14.1. I was testing on iOS 11.0.1 and 12.1 simulators but no difference.
If I use an iPhone device in the interface builder, and then run on iPad, it will display the grid using the iPhone size class despite having an already defined size for iPad. This leads to constraint warnings in the console. The iPad size class (R, R) has the width/height defined at 100, but the console states that the active constraint is 60, which is the default. Why is it ignoring the size class?
If I use an iPad device in the interface builder, and then run on iPad, it will display the grid correctly using the iPad size class. No constraint warnings.
If I use an iPad device in the interface builder, and then run on an iPhone, it will display the grid using the iPad size class despite having an already defined size for iPhone. This leads to constraint warnings in the console. The iPhone size class has the default width/height of 60, and the console states that the active constraint is 60 and will break it to use the iPad size of 100. Why is it using 100 when it's not even the correct size class?
If I use an iPhone device in the interface builder and then run on an iPhone, it displays the grid correctly using the iPhone size class. No constraint warnings.
The worse part is that there are other elements also defined by size classes except those are not affected; only these buttons.
This is how the settings look for the affected buttons.
I even tried adding repetitive values for iPhones but no difference. They are ignored and it's using the iPad (R, R) class if I leave the interface builder with an iPad device.
I can reproduce the same invalid scenarios on my iPhone, so it seems it is not just the simulators. I am not using any programmatic code at all. I have deleted derived data, reset simulators, close/reopen Xcode, clean build folder, delete/re-add constraints, but no difference.
ios ios-autolayout xcode10 size-classes
add a comment |
I have size classes defined for iPad and iPhones. I'm using Xcode 10.1 with latest Swift 4.2 on Mojave 10.14.1. I was testing on iOS 11.0.1 and 12.1 simulators but no difference.
If I use an iPhone device in the interface builder, and then run on iPad, it will display the grid using the iPhone size class despite having an already defined size for iPad. This leads to constraint warnings in the console. The iPad size class (R, R) has the width/height defined at 100, but the console states that the active constraint is 60, which is the default. Why is it ignoring the size class?
If I use an iPad device in the interface builder, and then run on iPad, it will display the grid correctly using the iPad size class. No constraint warnings.
If I use an iPad device in the interface builder, and then run on an iPhone, it will display the grid using the iPad size class despite having an already defined size for iPhone. This leads to constraint warnings in the console. The iPhone size class has the default width/height of 60, and the console states that the active constraint is 60 and will break it to use the iPad size of 100. Why is it using 100 when it's not even the correct size class?
If I use an iPhone device in the interface builder and then run on an iPhone, it displays the grid correctly using the iPhone size class. No constraint warnings.
The worse part is that there are other elements also defined by size classes except those are not affected; only these buttons.
This is how the settings look for the affected buttons.
I even tried adding repetitive values for iPhones but no difference. They are ignored and it's using the iPad (R, R) class if I leave the interface builder with an iPad device.
I can reproduce the same invalid scenarios on my iPhone, so it seems it is not just the simulators. I am not using any programmatic code at all. I have deleted derived data, reset simulators, close/reopen Xcode, clean build folder, delete/re-add constraints, but no difference.
ios ios-autolayout xcode10 size-classes
I have size classes defined for iPad and iPhones. I'm using Xcode 10.1 with latest Swift 4.2 on Mojave 10.14.1. I was testing on iOS 11.0.1 and 12.1 simulators but no difference.
If I use an iPhone device in the interface builder, and then run on iPad, it will display the grid using the iPhone size class despite having an already defined size for iPad. This leads to constraint warnings in the console. The iPad size class (R, R) has the width/height defined at 100, but the console states that the active constraint is 60, which is the default. Why is it ignoring the size class?
If I use an iPad device in the interface builder, and then run on iPad, it will display the grid correctly using the iPad size class. No constraint warnings.
If I use an iPad device in the interface builder, and then run on an iPhone, it will display the grid using the iPad size class despite having an already defined size for iPhone. This leads to constraint warnings in the console. The iPhone size class has the default width/height of 60, and the console states that the active constraint is 60 and will break it to use the iPad size of 100. Why is it using 100 when it's not even the correct size class?
If I use an iPhone device in the interface builder and then run on an iPhone, it displays the grid correctly using the iPhone size class. No constraint warnings.
The worse part is that there are other elements also defined by size classes except those are not affected; only these buttons.
This is how the settings look for the affected buttons.
I even tried adding repetitive values for iPhones but no difference. They are ignored and it's using the iPad (R, R) class if I leave the interface builder with an iPad device.
I can reproduce the same invalid scenarios on my iPhone, so it seems it is not just the simulators. I am not using any programmatic code at all. I have deleted derived data, reset simulators, close/reopen Xcode, clean build folder, delete/re-add constraints, but no difference.
ios ios-autolayout xcode10 size-classes
ios ios-autolayout xcode10 size-classes
asked Jan 2 at 11:25
Jose RamirezJose Ramirez
1,159921
1,159921
add a comment |
add a comment |
0
active
oldest
votes
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%2f54005477%2fwhy-is-the-simulator-using-the-size-class-in-which-i-left-the-interface-builder%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f54005477%2fwhy-is-the-simulator-using-the-size-class-in-which-i-left-the-interface-builder%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
JfCzceo4PxMO 3AbN5rL 4nXD ZhWQ71v G9uaUXz