I am trying to mimic UINavigationController's pushViewController using UIView animation but I have seem to run into an issue. I cannot animate the self.view.frame.
This is the code I am using but self.view just won't move!
[self.view addSubview:myViewController.view];
[myViewController.view setFrame:CGRectMake(320, 0, 320, 480)];
[UIView animateWithDuration:0.5
animations:^{
[self.view setFrame:CGRectMake(-320, 0, 320, 480)];
[myViewController.view setFrame:CGRectMake(0, 0, 320, 480)];
}
completion:^(BOOL finished){
[view1.view removeFromSuperview];
}];
Thanks!