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;








-3















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.



enter image description here










share|improve this question



















  • 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


















-3















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.



enter image description here










share|improve this question



















  • 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














-3












-3








-3








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.



enter image description here










share|improve this question
















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.



enter image description here







ios objective-c iphone-x






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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













  • 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













1 Answer
1






active

oldest

votes


















0














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:



enter image description here






share|improve this answer























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









    0














    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:



    enter image description here






    share|improve this answer



























      0














      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:



      enter image description here






      share|improve this answer

























        0












        0








        0







        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:



        enter image description here






        share|improve this answer













        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:



        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 22 at 19:48









        Pedro TrujilloPedro Trujillo

        16227




        16227





























            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%2f55303436%2fiphone-x-the-uiview-does-not-start-from-the-top%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

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript