2013-03-11 60 views
1

我正在寻找一种实现this kind of popover这种弹出窗口的方法。如何从iPad屏幕底部创建弹出窗口

是否有基本的iOS命令来生成这种风格,而不是我们在XCode中看到的通常的箭头+边框弹出窗口?或者是否有API来做这种事情。

弹出窗口从屏幕底部出现,就像在App Store动画中一样。

谢谢

+1

我认为这只是一个模态UIViewController与modalPresentationStyle被设置为UIModalPresentationFormSheet – rooster117 2013-03-11 22:56:56

+0

上帝我正在寻找一个t错了地方..谢谢! – juliensaad 2013-03-11 23:10:16

+0

我在下面的答案中写了更多 – rooster117 2013-03-11 23:59:36

回答

3

你想要做什么是创建一个自定义UIVIewController与形式上呈现样式设置为UIModalPresentationFormSheet

YourCustomViewController *customVC = [[YourCustomViewController alloc] initWithNib:@"YourCustomViewController" bundle:nil]; 

customVC.modalPresentationStyle = UIModalPresentationFormSheet; 

[self self presentViewController:customVC animated:YES completion:nil]; 

你也必须创建一个工具栏,并用正确格式化“关闭”或“完成”按钮,将关闭视图控制器