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;
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...
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
|
show 2 more comments
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...
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
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 callingmyImageview.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
|
show 2 more comments
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...
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
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...
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
ios swift user-interface interface-builder
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 callingmyImageview.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
|
show 2 more comments
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 callingmyImageview.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
|
show 2 more comments
4 Answers
4
active
oldest
votes
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
add a comment |
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.
This should be the accepted answer
– Koen
Jul 8 '18 at 20:35
add a comment |
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)
add a comment |
It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.
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%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
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
add a comment |
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
add a comment |
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
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
answered Mar 3 '16 at 19:06
GjeruldsenGjeruldsen
1541 silver badge15 bronze badges
1541 silver badge15 bronze badges
add a comment |
add a comment |
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.
This should be the accepted answer
– Koen
Jul 8 '18 at 20:35
add a comment |
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.
This should be the accepted answer
– Koen
Jul 8 '18 at 20:35
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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)
add a comment |
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)
add a comment |
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)
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)
answered Mar 3 '16 at 19:02
Harshil.ChokshiHarshil.Chokshi
2908 silver badges22 bronze badges
2908 silver badges22 bronze badges
add a comment |
add a comment |
It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.
add a comment |
It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.
add a comment |
It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.
It could be due to Image file format. You may need to change from JPG to PNG. In my case it worked.
answered Mar 26 at 22:05
Snehil ChouhanSnehil Chouhan
347 bronze badges
347 bronze badges
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%2f35780392%2fbuttons-labels-and-textfields-are-hidden-behind-image%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
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