Iphone x : The UIView does not start from the top Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Safe Area of Xcode 9How can I develop for iPhone using a Windows development machine?Starting iPhone app development in Linux?Error when testing on iOS simulator: Couldn't register with the bootstrap serverVertically align text to top within a UILabelHow can I make a UITextField move up when the keyboard is present - on starting to edit?Evenly space multiple views within a container viewUIScrollView Scrollable Content Size AmbiguityiOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 BetaSeeing black bars at the top and bottom of the iPhone X SimulatorsafeAreaInsets in UIView is 0 on an iPhone X
Are these square matrices always diagonalisable?
Did the Roman Empire have penal colonies?
Is a 5 watt UHF/VHF handheld considered QRP?
"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"
Is Electric Central Heating worth it if using Solar Panels?
What is it called when you ride around on your front wheel?
My admission is revoked after accepting the admission offer
Split coins into combinations of different denominations
Where did Arya get these scars?
Check if a string is entirely made of the same substring
How to not starve gigantic beasts
Implementing 3DES algorithm in Java: is my code secure?
What is the least dense liquid under normal conditions?
What *exactly* is electrical current, voltage, and resistance?
Raising a bilingual kid. When should we introduce the majority language?
Does Feeblemind produce an ongoing magical effect that can be dispelled?
Can I criticise the more senior developers around me for not writing clean code?
PIC mathematical operations weird problem
Co-worker works way more than he should
Married in secret, can marital status in passport be changed at a later date?
Second order approximation of the loss function (Deep learning book, 7.33)
My bank got bought out, am I now going to have to start filing tax returns in a different state?
Why is an operator the quantum mechanical analogue of an observable?
How do I check if a string is entirely made of the same substring?
Iphone x : The UIView does not start from the top
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Safe Area of Xcode 9How can I develop for iPhone using a Windows development machine?Starting iPhone app development in Linux?Error when testing on iOS simulator: Couldn't register with the bootstrap serverVertically align text to top within a UILabelHow can I make a UITextField move up when the keyboard is present - on starting to edit?Evenly space multiple views within a container viewUIScrollView Scrollable Content Size AmbiguityiOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 BetaSeeing black bars at the top and bottom of the iPhone X SimulatorsafeAreaInsets in UIView is 0 on an iPhone X
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
When I run the application in the simulator iphonex , I noticied that the UIView does not start from the top.
There is some space between my UIView and the topbar of the view.
please any help.
thank you.
ios objective-c iphone-x
|
show 8 more comments
When I run the application in the simulator iphonex , I noticied that the UIView does not start from the top.
There is some space between my UIView and the topbar of the view.
please any help.
thank you.
ios objective-c iphone-x
2
Can you please provide 1) a screenshot of the bug 2) the code or the storyboard you used to set up the view 3) what you want it to look like
– Oscar Apeland
Mar 22 at 15:57
2
@Stefan Seeing he has tagget iPhone X that seems likely. I also suspect he doesn't know what safe area is.
– Oscar Apeland
Mar 22 at 15:57
1
@Moez if you didn't understand what Stefan said, then you don't understand what Safe Area does. The Safe Area in iPhoneX has margins so the notch doesn't go over the content, but if you don't want those margins, then your constraints should be relative to the superview, not the safe area. There are different resources about it, I like this explanation, you should also read the Apple guide about it.
– Fantini
Mar 22 at 17:57
1
"i know what does mean the safe area" I think you don't.
– matt
Mar 22 at 19:51
2
If you understand what the safe area is, you are not surprised at what is happening. The top of the safe area is NOT the top of the screen on the iPhone X. It is further down. So your result, when you pin the top of your view to the top of the safe area, is just what you should expect.
– matt
Mar 25 at 16:29
|
show 8 more comments
When I run the application in the simulator iphonex , I noticied that the UIView does not start from the top.
There is some space between my UIView and the topbar of the view.
please any help.
thank you.
ios objective-c iphone-x
When I run the application in the simulator iphonex , I noticied that the UIView does not start from the top.
There is some space between my UIView and the topbar of the view.
please any help.
thank you.
ios objective-c iphone-x
ios objective-c iphone-x
edited Mar 22 at 16:20
Moez
asked Mar 22 at 15:54
MoezMoez
127
127
2
Can you please provide 1) a screenshot of the bug 2) the code or the storyboard you used to set up the view 3) what you want it to look like
– Oscar Apeland
Mar 22 at 15:57
2
@Stefan Seeing he has tagget iPhone X that seems likely. I also suspect he doesn't know what safe area is.
– Oscar Apeland
Mar 22 at 15:57
1
@Moez if you didn't understand what Stefan said, then you don't understand what Safe Area does. The Safe Area in iPhoneX has margins so the notch doesn't go over the content, but if you don't want those margins, then your constraints should be relative to the superview, not the safe area. There are different resources about it, I like this explanation, you should also read the Apple guide about it.
– Fantini
Mar 22 at 17:57
1
"i know what does mean the safe area" I think you don't.
– matt
Mar 22 at 19:51
2
If you understand what the safe area is, you are not surprised at what is happening. The top of the safe area is NOT the top of the screen on the iPhone X. It is further down. So your result, when you pin the top of your view to the top of the safe area, is just what you should expect.
– matt
Mar 25 at 16:29
|
show 8 more comments
2
Can you please provide 1) a screenshot of the bug 2) the code or the storyboard you used to set up the view 3) what you want it to look like
– Oscar Apeland
Mar 22 at 15:57
2
@Stefan Seeing he has tagget iPhone X that seems likely. I also suspect he doesn't know what safe area is.
– Oscar Apeland
Mar 22 at 15:57
1
@Moez if you didn't understand what Stefan said, then you don't understand what Safe Area does. The Safe Area in iPhoneX has margins so the notch doesn't go over the content, but if you don't want those margins, then your constraints should be relative to the superview, not the safe area. There are different resources about it, I like this explanation, you should also read the Apple guide about it.
– Fantini
Mar 22 at 17:57
1
"i know what does mean the safe area" I think you don't.
– matt
Mar 22 at 19:51
2
If you understand what the safe area is, you are not surprised at what is happening. The top of the safe area is NOT the top of the screen on the iPhone X. It is further down. So your result, when you pin the top of your view to the top of the safe area, is just what you should expect.
– matt
Mar 25 at 16:29
2
2
Can you please provide 1) a screenshot of the bug 2) the code or the storyboard you used to set up the view 3) what you want it to look like
– Oscar Apeland
Mar 22 at 15:57
Can you please provide 1) a screenshot of the bug 2) the code or the storyboard you used to set up the view 3) what you want it to look like
– Oscar Apeland
Mar 22 at 15:57
2
2
@Stefan Seeing he has tagget iPhone X that seems likely. I also suspect he doesn't know what safe area is.
– Oscar Apeland
Mar 22 at 15:57
@Stefan Seeing he has tagget iPhone X that seems likely. I also suspect he doesn't know what safe area is.
– Oscar Apeland
Mar 22 at 15:57
1
1
@Moez if you didn't understand what Stefan said, then you don't understand what Safe Area does. The Safe Area in iPhoneX has margins so the notch doesn't go over the content, but if you don't want those margins, then your constraints should be relative to the superview, not the safe area. There are different resources about it, I like this explanation, you should also read the Apple guide about it.
– Fantini
Mar 22 at 17:57
@Moez if you didn't understand what Stefan said, then you don't understand what Safe Area does. The Safe Area in iPhoneX has margins so the notch doesn't go over the content, but if you don't want those margins, then your constraints should be relative to the superview, not the safe area. There are different resources about it, I like this explanation, you should also read the Apple guide about it.
– Fantini
Mar 22 at 17:57
1
1
"i know what does mean the safe area" I think you don't.
– matt
Mar 22 at 19:51
"i know what does mean the safe area" I think you don't.
– matt
Mar 22 at 19:51
2
2
If you understand what the safe area is, you are not surprised at what is happening. The top of the safe area is NOT the top of the screen on the iPhone X. It is further down. So your result, when you pin the top of your view to the top of the safe area, is just what you should expect.
– matt
Mar 25 at 16:29
If you understand what the safe area is, you are not surprised at what is happening. The top of the safe area is NOT the top of the screen on the iPhone X. It is further down. So your result, when you pin the top of your view to the top of the safe area, is just what you should expect.
– matt
Mar 25 at 16:29
|
show 8 more comments
1 Answer
1
active
oldest
votes
Something similar happened to me. In the storyboard make sure that there is not Center Vertically in Container (in Size inspector -> constraints -> Align Center to: ) if exist remove it and try to make that view height Equal Height to the ViewController height. Just press Ctr key + drag from your problematic view to the ViewController View, it will pop up a dark menu, pick there Equal Height as described in the image below:
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%2f55303436%2fiphone-x-the-uiview-does-not-start-from-the-top%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
Something similar happened to me. In the storyboard make sure that there is not Center Vertically in Container (in Size inspector -> constraints -> Align Center to: ) if exist remove it and try to make that view height Equal Height to the ViewController height. Just press Ctr key + drag from your problematic view to the ViewController View, it will pop up a dark menu, pick there Equal Height as described in the image below:
add a comment |
Something similar happened to me. In the storyboard make sure that there is not Center Vertically in Container (in Size inspector -> constraints -> Align Center to: ) if exist remove it and try to make that view height Equal Height to the ViewController height. Just press Ctr key + drag from your problematic view to the ViewController View, it will pop up a dark menu, pick there Equal Height as described in the image below:
add a comment |
Something similar happened to me. In the storyboard make sure that there is not Center Vertically in Container (in Size inspector -> constraints -> Align Center to: ) if exist remove it and try to make that view height Equal Height to the ViewController height. Just press Ctr key + drag from your problematic view to the ViewController View, it will pop up a dark menu, pick there Equal Height as described in the image below:
Something similar happened to me. In the storyboard make sure that there is not Center Vertically in Container (in Size inspector -> constraints -> Align Center to: ) if exist remove it and try to make that view height Equal Height to the ViewController height. Just press Ctr key + drag from your problematic view to the ViewController View, it will pop up a dark menu, pick there Equal Height as described in the image below:
answered Mar 22 at 19:48
Pedro TrujilloPedro Trujillo
16227
16227
add a comment |
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%2f55303436%2fiphone-x-the-uiview-does-not-start-from-the-top%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
2
Can you please provide 1) a screenshot of the bug 2) the code or the storyboard you used to set up the view 3) what you want it to look like
– Oscar Apeland
Mar 22 at 15:57
2
@Stefan Seeing he has tagget iPhone X that seems likely. I also suspect he doesn't know what safe area is.
– Oscar Apeland
Mar 22 at 15:57
1
@Moez if you didn't understand what Stefan said, then you don't understand what Safe Area does. The Safe Area in iPhoneX has margins so the notch doesn't go over the content, but if you don't want those margins, then your constraints should be relative to the superview, not the safe area. There are different resources about it, I like this explanation, you should also read the Apple guide about it.
– Fantini
Mar 22 at 17:57
1
"i know what does mean the safe area" I think you don't.
– matt
Mar 22 at 19:51
2
If you understand what the safe area is, you are not surprised at what is happening. The top of the safe area is NOT the top of the screen on the iPhone X. It is further down. So your result, when you pin the top of your view to the top of the safe area, is just what you should expect.
– matt
Mar 25 at 16:29