IOS:更改 View 的建议

标签 ios xcode view

在天气应用程序中(在 basilar iPhone 应用程序中)有一个带有“i”的按钮用于获取信息;当你按下这个“i”时,会有一个有趣的效果来改变 View ;这个效果的名字是什么?我想在我的应用程序中重播它。

最佳答案

它是 UIViewControllerUIView 之间的模式转换样式。

在您描述的示例中,正在加载的 UIViewController 以模态方式呈现,过渡样式设置为 UIModalTransitionStyleFlipHorizo​​ntal

UIViewController *controllerToBeLoaded = [[UIViewController alloc] init];
self.modalPresentationStyle = UIModalTransitionStyleFlipHorizontal;
[self presenteModalViewController:controllerToBeLoaded animated:YES];

self 也是一个 UIViewController

关于IOS:更改 View 的建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6724245/

相关文章:

ios - 如何在从 uiimagepicker 捕获图像后自定义图像

ios - HealthKit 能告诉我数据有多新鲜吗?

iphone - 从 UINavigationController 推送 UITabBarController

iphone - 如何让我的 iPhone 应用程序在 iPad 上运行?

layout - 如何正确地将多个片段添加到片段过渡?

ios - 以编程方式创建 UITableViewCells

ios - 是否可以构建一个应用程序来修改 iOS 中其他应用程序的通知?

swift - 如何从另一个类中设置 View 的导出值

java - 从 xml 创建自定义 View

ios - Xcode View 透明背景不影响 subview