I\'m displaying an UIViewController by the following way:
MyViewController *myVc = [[MyViewController alloc] initWithNibName:@\"MyViewController\" bundle:ni
iOS only uses the first-level children of the UIView to decide where to position the partial page curl. That allows you to add a 2nd level child view with a frame of e.g. (0, -50, 320, 100) that slips into the area you call the "dead area".
I believe the posters here and in related threads are having problems because they are trying to decorate the background of the underlying view using another view, such as an image view. The correct way to set a background - and which will not affect the page curl, is to actually set the background.
- (void)viewDidLoad {
[super viewDidLoad];
//BG
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"StitchTileBG.png"]];
}
Leave using views and such for actual user interface elements
MyViewController * myVc = [[MyViewController alloc] initWithNibName:nil bundle:nil];
[UIView beginAnimations:@"flipPage" context:NULL];
[UIView setAnimationDuration:2];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[self.view addSubview:myVc.view];
[UIView commitAnimations];
What's the problem here? Populate content in the modalView
in such a way that the visible area is utilized. If I am not wrong, the modalPageCurl
effect has no option to set the extent of curl (or how much of the screen it should occupy).
So I suggest you skip this approach & focus on trying to cover (or utilize) as much screen is available...