【发布时间】:2012-02-22 07:41:48
【问题描述】:
有一个 iOS 5 故事板问题。我用 Storyboards 构建的第一个应用程序,我喜欢使用它们,但我一生都无法弄清楚如何从 UIActionSheet 按钮加载视图。我的 UIActionSheet 运行得很好,它加载了一个 UIAddressBook 选择器,但我想让它切换到一个新的故事板视图控制器。
有什么想法吗?
以下是部分代码:
// Specify what to do when a user selects a button from the personSelectQuery
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0) {
[self showAddressPicker];//This works just fine to show the address book
} else if (buttonIndex == 1){
[self showAddPersonView];//This is the custom storyboard view i want to load
}
}
【问题讨论】:
标签: ios5 uiactionsheet