UIModalTransitionStylePartialCurl half page

岁酱吖の 提交于 2019-12-01 06:28:04

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...

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];
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!