[英]iPhone flipside view
Stupid question of the day: where can I find info in the docs about creating flipside views??? 当今的愚蠢问题:在文档中哪里可以找到有关创建反面视图的信息??? Thanks
谢谢
The basics are fairly straight forward, assuming you're using UIViewControllers. 假设您使用的是UIViewControllers,则基础知识相当简单。 You have a button hooked up to an IBAction.
您有一个连接到IBAction的按钮。 In the action method you set the controllers
modalTransitionStyle
to UIModalTransitionStyleFlipHorizontal
and then load the controller: 在操作方法中,将控制器的
modalTransitionStyle
设置为UIModalTransitionStyleFlipHorizontal
,然后加载控制器:
- (IBAction)showInfo {
OtherController* controller = [[OtherController alloc] initWithNibName:@"SomeNib" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController: controller animated:YES];
[controller release];
}
You'll have to be able to dismiss it, but that's not too hard. 您必须能够将其消除,但这并不难。 In
OtherController
you just have to call dismissModalViewControllerAnimated:
: 在
OtherController
您只需要调用dismissModalViewControllerAnimated:
:
[self dismissModalViewControllerAnimated:YES];
Do you mean flipping around like in the Weather app? 您是说要像“天气”应用中那样翻转吗? Try taking a look at the Utility Application template in Xcode.
尝试看看Xcode中的Utility Application模板。 It sets this up for you automatically.
它会自动为您设置。
Well, it's not really a documentation issue. 好吧,这实际上不是文档问题。 The easiest way is for you to look at some code, which you can get by creating the proper Xcode project:
最简单的方法是让您查看一些代码,可以通过创建适当的Xcode项目来获得这些代码:
Study this code (use it, even). 研究此代码(甚至使用它)。 That's a really easy way to get started with a flipside view on the iPhone.
这是在iPhone上开始反面查看的一种非常简单的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.