Reputation:
I have a customView on main window, so I want my Viewcontroller's view to resize so that it doesn't overlaps with the custom view on main window.
I tried setting frame property of my VC's view in the viewDidLoad method but it automatically resizes to full window height.
self.view setFrame: CGRectMake(0,0, 320, 200);
But when my view is loaded/appears it resizes it to full window height (that is 480px).
Am I trying to do something which is not possible?
Upvotes: 1
Views: 1327
Reputation: 93
UIView *loadingView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 200.0)];
loadingView.backgroundColor = [UIColor darkGrayColor]; //optional For You
[window addSubview:loadingView];
Try this, I Hope you will get your solution.
Upvotes: 1
Reputation: 1977
try myViewController.view addSubview:self.window
after setting the frame property.
And try to make the mainwindow
programmatically to have more control over it.
hope it helps..
Upvotes: 0