Ok, this might sound simple, but somehow I can't get this function to work .
- (void)setViewMovedUp:(BOOL)movedUp {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
CGRect rect = self.view.frame;
NSLog(@"%f",self.view.frame.size.height);
if (movedUp)
{
NSLog(@"test Moved Up");
rect.origin.y += 60;
rect.size.height -= 300;
}
self.view.frame = rect ;
NSLog(@"%f after:",self.view.frame.size.height);
[UIView commitAnimations];
}
All the NSLogs are printing results fine and "Test Moved Up" appears so I know there is nothing wrong upstream .
This function is part of the implementation file of my MainViewController ( which manages the root view of my Window app ) .
I assume I have to call : self.view.frame, right ?
No error or warning appears, but it just doesn`t move despite printing out the logs correctly ..
Edit, this is the hierarchy in IB :
Edit again : I'm actually wondering if I'm allowed to move that view up, are we allowed to move views up if they are at the top of the hierarchy ? Then what would be revealed behind ?