Reputation: 7840
I am completely new to iPad development and facing this issue:
In added a View, "LoginView", as a subview of "detailView". I displays fine in portrait mode, but in landscape mode its getting shifted to lefthand side and covers only half of the screen.
Please help me and provide solutions for these two:
1) "LoginView" should cover the complete screen in landscape mode.
2) After LoginView, if login is successful I add 'SearchView' to 'LoginView' as subview, but this screen is hiding the toolbar(and thus toolbar button) in both the Portrait/Landscape I want that toolbar to be visible.
3) Again this 'SearchView' is shifted to left of the screen I want this to be on righthand side.
Upvotes: 0
Views: 1281
Reputation: 4738
If you're using Interface Builder then open inspector and go to the size tab.
You can define how the view should resizing.
If you are programmatically designing your view then you can have define the autoresizing mask with:
// eg. of a possible combinaison
view.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleRightMargin;
/* With a possible combinaison of those value:
UIViewAutoresizingNone
UIViewAutoresizingFlexibleLeftMargin
UIViewAutoresizingFlexibleWidth
UIViewAutoresizingFlexibleRightMargin
UIViewAutoresizingFlexibleTopMargin
UIViewAutoresizingFlexibleHeight
UIViewAutoresizingFlexibleBottomMargin
*/
Upvotes: 2