gpt4 book ai didi

objective-c - 如何更改 modalTransitionStyle?

转载 作者:搜寻专家 更新时间:2023-10-30 20:01:46 31 4
gpt4 key购买 nike

我目前正在使用此代码调出一个信息窗口

-(IBAction)showInfo:(id)发件人{
InfoView *info = [[InfoView alloc] initWithNibName:nil bundle:[NSBundle mainBundle]];
[ self 呈现模态视图 Controller :动画信息:是];
[信息发布];
}

它目前使用默认的过渡样式 UIModalTransitionStyleCoverVertical,我想让它使用不同的过渡样式,例如 UIModalTransitionStyleFlipHorizo​​ntal,我该怎么做?

最佳答案

来自苹果文档 http://developer.apple.com/iphone/library/samplecode/AddMusic/Listings/Classes_MainViewController_m.html#//apple_ref/doc/uid/DTS40008845-Classes_MainViewController_m-DontLinkElementID_6

MusicTableViewController *controller = [[MusicTableViewController alloc] initWithNibName: @"MusicTableView" bundle: nil];
controller.delegate = self;

controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical;

[self presentModalViewController: controller animated: YES];
[controller release];

关于objective-c - 如何更改 modalTransitionStyle?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3562873/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com