I am creating a view and setting its autoresizemask:
UIViewController *vc = [[UIViewController alloc]init];
vc.view.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFlexibleBottomMargin |
UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight);
I am then adding it as a subview.
[self.mainView addSubview:flightsHome.view]; //mainView is a UIView IBOutlet which is positioned perfectly
This view is used in both portrait and landscape orientations and I want it to resize accordingly.
My question is what frame (size, origin) should I give this view initially and how does Cocoa Touch determine what the initial frame is.
The code above does not resize as I expect it to.