Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

EducationApp

macrumors newbie
Original poster
Aug 17, 2011
18
0
I am making a drawing app with about 10 UIButtons that must be on top of the drawing.

Would it go something like:
Code:
[(redbutton) bringSubviewToFront:redbutton];

or just try to send the background back with something like this?
Code:
[(self.view) sendSubviewToBack:self.view];
But neither of them work.
I'm having trouble with this and it is the last step in my app.
 
Last edited by a moderator:
You tell the superview to bring the subview to the front.

If the code is going in your view controller, then it should look like:
Code:
[self.view bringSubviewToFront:redButton];
 
My code is not in my view controller, could this be the problem. It is under Image.h
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.