我正在尝试创建一个面板,它可以在我的 View 上滑动以显示更多与 ipad 上的应用商店非常相似的内容:
是否有类似这样的类,还是我必须从头开始创建它?
提前致谢, 本
最佳答案
我找到了如何做到这一点,使用:
UIViewController *sampleView = [[UIViewController alloc]init];
[sampleView setModalPresentationStyle:UIModalPresentationFormSheet];
[self presentViewController:sampleView animated:YES completion:NULL];
如果你想要像应用商店中那样的方角,你可以使用:
self.view.layer.cornerRadius = 0;
在您使用的 UIViewController 的 viewWillAppear:(BOOL)animated 方法中。您将需要导入 QuartzCore/QuartzCore.h。
关于ios - 覆盖面板 iPad,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12872441/