[英]Page curl on iOS: Keep showing toolbar like in standard Maps app
我正在尝试实现与“地图”应用程序相同的效果:页面卷曲,其中工具栏不是卷曲的一部分。 例如:
http://www.patentlyapple.com/.a/6a0120a5580826970c0120a8a7172c970b-800wi
当前,这是开始卷曲的代码:
MKTModalViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"MapOptions"];
controller.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentViewController:controller animated:YES completion:nil];
当前视图控制器(上面的self)包含地图和工具栏。 使用上面的代码,整个页面会变得卷曲。 我只希望地图缩小,而工具栏位于同一位置。
有谁知道这是怎么做到的吗? 我是否想(相对容易)做到所有可能?
谢谢你的帮助。
我假设在Maps应用中,UIToolbar实际上是UINavigationController拥有的工具栏。 确保您的UIToolbar不是您添加到ViewController的新工具。
在您的UIViewController中尝试以下操作:
// add your buttons and controls to self.navigationController.toolbar;
self.navigationController.toolbarHidden = NO;
MKTModalViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"MapOptions"];
controller.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:controller animated:YES];
不知道这是否会在我的脑海中浮现,但它应该使您朝正确的方向前进。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.