I have Implement Some paint like application. For that the Layout is like as below:
<You have to make sure your buttons are not subviews of the view you are drawing in.
The simplest way to do this is to organize your buttons and your view in interface builder so that you have a UIView within your window as well as your buttons which must be on a higher layer than your UIView but cannot be inside your UIView. I would post pictures if the site would let me. You will then need to make a UIView IBOutlet to attatch to the UIView in Interface Builder and to draw to in your code.
To do this programmatically, after you have created your buttons, create a UIView and add it as a subview to your viewController's view by using (if myView is your UIView)
[self.view addSubview:myView]
and then use
[self.view send SubviewToBack:myView]
to make sure it is behind your other subviews (your buttons). Draw to myView and it should appear behind the buttons.