Reputation: 29896
I present a viewcontroller from a button pressed in a view that is within a tabbar view. The issue I am having is that the presented view covers the tabbar and the view fills the entire screen.
Even if I set its size to the size of the view minus the tab bar, the view still shows white in the area where the tabbar is.
How is this view presented so that it fits within the view of the tabbar screen?
Upvotes: 0
Views: 158
Reputation: 44633
Modal view controllers in an iphone will take up the entire screen. This can't be altered. Use navigation controllers for your job.
If you are using the tab bar controller, you can simply add the navigation controller in lieu of the current controller and make the current controller its root view controller. The frame sizes and view changes on tab selection are automatically handled the tab bar controller.
If you are using tab bar and are manually swapping stuff, you will need to set the navigation controllers view like you were trying to set the modal view controller above. This should solve this problem.
Upvotes: 1