Buttons, labels, and TextFields are hidden behind imageHow to navigate through textfields (Next / Done Buttons)UITableView with static cells does not appearautomatic constraints to a label inside xib swiftUIImageView missing images in Launch Screen on deviceImageView with label that has a dynamic position for different sized imagesSwift - UIView inside custom UITableViewCell won't update buttons/labelsHow to bring an SKSprite in front of a storyboard's UI?View Controller (UIViewController) Storyboard with multiple scenes using same background imageAutoLayout With a Label, Textfield(embedded button), CustomObject ViewInterface builder doesn't stretch subviews of custom view

What force enables us to walk? Friction or normal reaction?

Why would an invisible personal shield be necessary?

What is my clock telling me to do?

Adding a (stair/baby) gate without facing walls

How does the barbarian bonus damage interact with two weapon fighting?

Creating if in setter/getter

"Valet parking " or "parking valet"

Why does the Rust compiler not optimize code assuming that two mutable references cannot alias?

What Marvel character has this 'W' symbol?

Just how much information should you share with a former client?

Word for soundtrack music which is part of the action of the movie

How does Asimov's second law deal with contradictory orders from different people?

How to structure presentation to avoid getting questions that will be answered later in the presentation?

Patio gate not at right angle to the house

Word for giving preference to the oldest child

Was Donald Trump at ground zero helping out on 9-11?

PCB design using code instead of clicking a mouse?

If the Moon were impacted by a suitably sized meteor, how long would it take to impact the Earth?

How can I type the name of the person I'm calling on the dial pad and make the call?

Why are we moving in circles with a tandem kayak?

If I buy and download a game through second Nintendo account do I own it on my main account too?

How did Biff return to 2015 from 1955 without a lightning strike?

Should 2FA be enabled on service accounts?

Can machine learning learn a function like finding maximum from a list?



Buttons, labels, and TextFields are hidden behind image


How to navigate through textfields (Next / Done Buttons)UITableView with static cells does not appearautomatic constraints to a label inside xib swiftUIImageView missing images in Launch Screen on deviceImageView with label that has a dynamic position for different sized imagesSwift - UIView inside custom UITableViewCell won't update buttons/labelsHow to bring an SKSprite in front of a storyboard's UI?View Controller (UIViewController) Storyboard with multiple scenes using same background imageAutoLayout With a Label, Textfield(embedded button), CustomObject ViewInterface builder doesn't stretch subviews of custom view






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am planning to create the card game 'War' for ios just to get more practice working with Swift and have a problem. I used the main storyboard to create all the interface objects. Here is a screenshot...



enter image description here



So I first added an image view and set the image view size as the viewcontroller's view's size and then added a greenish background image. Then I added the labels, text fields, and button. But when I run the app all I see the green background and none of the interface objects. I am thinking it is because the interface items are behind the green background. But it does not make sense because I added the interface objects after the green background.



Anyone know what the issue is and how to solve it?
Thank you










share|improve this question
























  • Honest question--why are you setting up the UI in code instead of in a storyboard or xib?

    – NRitH
    Mar 3 '16 at 19:03






  • 1





    I am setting the code in StoryBoard...not code

    – Harshil.Chokshi
    Mar 3 '16 at 19:03











  • Not if you're calling myImageview.addSubview(...) in code.

    – NRitH
    Mar 3 '16 at 19:07












  • If you're doing both, then you wind up adding each of those subviews twice.

    – NRitH
    Mar 3 '16 at 19:08











  • Oh ok Now I see what you mean. So now whats happening is that the button and labels are behind AND in front of the background image?

    – Harshil.Chokshi
    Mar 3 '16 at 19:11

















1















I am planning to create the card game 'War' for ios just to get more practice working with Swift and have a problem. I used the main storyboard to create all the interface objects. Here is a screenshot...



enter image description here



So I first added an image view and set the image view size as the viewcontroller's view's size and then added a greenish background image. Then I added the labels, text fields, and button. But when I run the app all I see the green background and none of the interface objects. I am thinking it is because the interface items are behind the green background. But it does not make sense because I added the interface objects after the green background.



Anyone know what the issue is and how to solve it?
Thank you










share|improve this question
























  • Honest question--why are you setting up the UI in code instead of in a storyboard or xib?

    – NRitH
    Mar 3 '16 at 19:03






  • 1





    I am setting the code in StoryBoard...not code

    – Harshil.Chokshi
    Mar 3 '16 at 19:03











  • Not if you're calling myImageview.addSubview(...) in code.

    – NRitH
    Mar 3 '16 at 19:07












  • If you're doing both, then you wind up adding each of those subviews twice.

    – NRitH
    Mar 3 '16 at 19:08











  • Oh ok Now I see what you mean. So now whats happening is that the button and labels are behind AND in front of the background image?

    – Harshil.Chokshi
    Mar 3 '16 at 19:11













1












1








1








I am planning to create the card game 'War' for ios just to get more practice working with Swift and have a problem. I used the main storyboard to create all the interface objects. Here is a screenshot...



enter image description here



So I first added an image view and set the image view size as the viewcontroller's view's size and then added a greenish background image. Then I added the labels, text fields, and button. But when I run the app all I see the green background and none of the interface objects. I am thinking it is because the interface items are behind the green background. But it does not make sense because I added the interface objects after the green background.



Anyone know what the issue is and how to solve it?
Thank you










share|improve this question














I am planning to create the card game 'War' for ios just to get more practice working with Swift and have a problem. I used the main storyboard to create all the interface objects. Here is a screenshot...



enter image description here



So I first added an image view and set the image view size as the viewcontroller's view's size and then added a greenish background image. Then I added the labels, text fields, and button. But when I run the app all I see the green background and none of the interface objects. I am thinking it is because the interface items are behind the green background. But it does not make sense because I added the interface objects after the green background.



Anyone know what the issue is and how to solve it?
Thank you







ios swift user-interface interface-builder






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 3 '16 at 18:44









Harshil.ChokshiHarshil.Chokshi

2908 silver badges22 bronze badges




2908 silver badges22 bronze badges















  • Honest question--why are you setting up the UI in code instead of in a storyboard or xib?

    – NRitH
    Mar 3 '16 at 19:03






  • 1





    I am setting the code in StoryBoard...not code

    – Harshil.Chokshi
    Mar 3 '16 at 19:03











  • Not if you're calling myImageview.addSubview(...) in code.

    – NRitH
    Mar 3 '16 at 19:07












  • If you're doing both, then you wind up adding each of those subviews twice.

    – NRitH
    Mar 3 '16 at 19:08











  • Oh ok Now I see what you mean. So now whats happening is that the button and labels are behind AND in front of the background image?

    – Harshil.Chokshi
    Mar 3 '16 at 19:11

















  • Honest question--why are you setting up the UI in code instead of in a storyboard or xib?

    – NRitH
    Mar 3 '16 at 19:03






  • 1





    I am setting the code in StoryBoard...not code

    – Harshil.Chokshi
    Mar 3 '16 at 19:03











  • Not if you're calling myImageview.addSubview(...) in code.

    – NRitH
    Mar 3 '16 at 19:07












  • If you're doing both, then you wind up adding each of those subviews twice.

    – NRitH
    Mar 3 '16 at 19:08











  • Oh ok Now I see what you mean. So now whats happening is that the button and labels are behind AND in front of the background image?

    – Harshil.Chokshi
    Mar 3 '16 at 19:11
















Honest question--why are you setting up the UI in code instead of in a storyboard or xib?

– NRitH
Mar 3 '16 at 19:03





Honest question--why are you setting up the UI in code instead of in a storyboard or xib?

– NRitH
Mar 3 '16 at 19:03




1




1





I am setting the code in StoryBoard...not code

– Harshil.Chokshi
Mar 3 '16 at 19:03





I am setting the code in StoryBoard...not code

– Harshil.Chokshi
Mar 3 '16 at 19:03













Not if you're calling myImageview.addSubview(...) in code.

– NRitH
Mar 3 '16 at 19:07






Not if you're calling myImageview.addSubview(...) in code.

– NRitH
Mar 3 '16 at 19:07














If you're doing both, then you wind up adding each of those subviews twice.

– NRitH
Mar 3 '16 at 19:08





If you're doing both, then you wind up adding each of those subviews twice.

– NRitH
Mar 3 '16 at 19:08













Oh ok Now I see what you mean. So now whats happening is that the button and labels are behind AND in front of the background image?

– Harshil.Chokshi
Mar 3 '16 at 19:11





Oh ok Now I see what you mean. So now whats happening is that the button and labels are behind AND in front of the background image?

– Harshil.Chokshi
Mar 3 '16 at 19:11












4 Answers
4






active

oldest

votes


















5














To bring something to the front, simply select it in your storyboard. Click on Editor in the top left corner. Go to Arrange --> Send to Front



Here's a picture of the menu: http://imgur.com/0A0F9QQ






share|improve this answer
































    4














    In the view hierarchy, drag your background image to be the first subview of your view. The order of subviews in the tree goes back->front.






    share|improve this answer

























    • This should be the accepted answer

      – Koen
      Jul 8 '18 at 20:35


















    0














    Okay so the problem was that all the interface items were behind the image view background. And I solved the problem my adding all the interface items as a subview of the imageview, like code below.



    myImageview.addSubview(myButton)
    myImageview.addSubview(myLabel)
    myImageview.addSubview(myTextField)





    share|improve this answer
































      -1














      It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.






      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%2f35780392%2fbuttons-labels-and-textfields-are-hidden-behind-image%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        5














        To bring something to the front, simply select it in your storyboard. Click on Editor in the top left corner. Go to Arrange --> Send to Front



        Here's a picture of the menu: http://imgur.com/0A0F9QQ






        share|improve this answer





























          5














          To bring something to the front, simply select it in your storyboard. Click on Editor in the top left corner. Go to Arrange --> Send to Front



          Here's a picture of the menu: http://imgur.com/0A0F9QQ






          share|improve this answer



























            5












            5








            5







            To bring something to the front, simply select it in your storyboard. Click on Editor in the top left corner. Go to Arrange --> Send to Front



            Here's a picture of the menu: http://imgur.com/0A0F9QQ






            share|improve this answer













            To bring something to the front, simply select it in your storyboard. Click on Editor in the top left corner. Go to Arrange --> Send to Front



            Here's a picture of the menu: http://imgur.com/0A0F9QQ







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 3 '16 at 19:06









            GjeruldsenGjeruldsen

            1541 silver badge15 bronze badges




            1541 silver badge15 bronze badges


























                4














                In the view hierarchy, drag your background image to be the first subview of your view. The order of subviews in the tree goes back->front.






                share|improve this answer

























                • This should be the accepted answer

                  – Koen
                  Jul 8 '18 at 20:35















                4














                In the view hierarchy, drag your background image to be the first subview of your view. The order of subviews in the tree goes back->front.






                share|improve this answer

























                • This should be the accepted answer

                  – Koen
                  Jul 8 '18 at 20:35













                4












                4








                4







                In the view hierarchy, drag your background image to be the first subview of your view. The order of subviews in the tree goes back->front.






                share|improve this answer













                In the view hierarchy, drag your background image to be the first subview of your view. The order of subviews in the tree goes back->front.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 3 '16 at 19:09









                NRitHNRitH

                8,3492 gold badges27 silver badges33 bronze badges




                8,3492 gold badges27 silver badges33 bronze badges















                • This should be the accepted answer

                  – Koen
                  Jul 8 '18 at 20:35

















                • This should be the accepted answer

                  – Koen
                  Jul 8 '18 at 20:35
















                This should be the accepted answer

                – Koen
                Jul 8 '18 at 20:35





                This should be the accepted answer

                – Koen
                Jul 8 '18 at 20:35











                0














                Okay so the problem was that all the interface items were behind the image view background. And I solved the problem my adding all the interface items as a subview of the imageview, like code below.



                myImageview.addSubview(myButton)
                myImageview.addSubview(myLabel)
                myImageview.addSubview(myTextField)





                share|improve this answer





























                  0














                  Okay so the problem was that all the interface items were behind the image view background. And I solved the problem my adding all the interface items as a subview of the imageview, like code below.



                  myImageview.addSubview(myButton)
                  myImageview.addSubview(myLabel)
                  myImageview.addSubview(myTextField)





                  share|improve this answer



























                    0












                    0








                    0







                    Okay so the problem was that all the interface items were behind the image view background. And I solved the problem my adding all the interface items as a subview of the imageview, like code below.



                    myImageview.addSubview(myButton)
                    myImageview.addSubview(myLabel)
                    myImageview.addSubview(myTextField)





                    share|improve this answer













                    Okay so the problem was that all the interface items were behind the image view background. And I solved the problem my adding all the interface items as a subview of the imageview, like code below.



                    myImageview.addSubview(myButton)
                    myImageview.addSubview(myLabel)
                    myImageview.addSubview(myTextField)






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 3 '16 at 19:02









                    Harshil.ChokshiHarshil.Chokshi

                    2908 silver badges22 bronze badges




                    2908 silver badges22 bronze badges
























                        -1














                        It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.






                        share|improve this answer





























                          -1














                          It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.






                          share|improve this answer



























                            -1












                            -1








                            -1







                            It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.






                            share|improve this answer













                            It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 26 at 22:05









                            Snehil ChouhanSnehil Chouhan

                            347 bronze badges




                            347 bronze badges






























                                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%2f35780392%2fbuttons-labels-and-textfields-are-hidden-behind-image%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

                                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

                                은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현