views:

203

answers:

1

I have a window and add a navigation controller's view to it, all I want is for the navigation controller's view to take half of the window (top half) and want to add another view to bottom half. I'm trying to set the frame for navigation controller's view, but 0,0 is the topmost point on screen (doesn't count the iPhone's status bar). I can find (hopefully) an API to give me the size of the status bar, but I suspect there is a more civilised way of doing this. any help appreciated.

A: 

Your UIView class allows you to add multiple subviews into it. What you should do is just layout two subviews, one in the top, other in the bottom. Use the addSubview method on your UIView to add as many views as you want to the parent view. You may be interested in reading the 'Creating and Managing the View Hierarchy'

sfa
Yes, instead of trying to divide a window into two views, you could add the second view to every view you push onto the navigation stack. Unfortunately, this is very messy.
Casebash