Reputation: 3417
So i have a problem that i know how to solve but not in ann efficient/fast way. Look at this example that i have right now:
So I had made all the outlets before I decided that I need a background image. You can see that I marked them but they are under the UIImage
. I can solve this by first removing the image and dragging all the views to another view controller then adding the UIImage
and putting the views back on the ImageView but this is time consuming as I have other view controllers. Is there another way to move views up/down?
Upvotes: 0
Views: 46
Reputation: 131481
Think of the views as being listed in the order they are placed on top of others. You start at the top of the list, adding views, and then add the ones next on the list on top, one a time. That's how I remember the ordering.
As Luk2302 says, you can simply drag your views around inside your storyboard to change their order.
Note that there is also an "arrange" sub-menu in the editor menu for IB. You could select your background image, then pick editor>arrange>send to back
to move the background view to the back of the stack of views.
P.S.: Don't call them outlets. They are views. Views can be linked to your code using IBOutlets
, but they don't have to be. Plus other non-view objects like constraints can also be linked to your code with IBOutlets
Upvotes: 1
Reputation: 5098
Its simple.what you have to do is simply drag you imageview
to the top of the view(then it becomes the first IBOutlet
you added). I have added some images, then it will easy to understand.
this is your situation
this is the solution(drag it to the top of the view)
then your other IBOutlets
come to the front like this
Upvotes: 1