ios - ios 5 中带有 Storyboard 的 Table ViewController

标签 ios ios4 ios5 ios-4.2

我已经开始使用 Storyboard,这是 iOS 5 中的一个新功能,所以我从一个选项卡式应用程序开始,然后我添加了一个表格 View Controller 并用一些虚拟数据填充单元格,现在,表格有 4 个单元格,现在点击每个单元格,我想打开一个新的ViewController,每个单元格都不同,

所以以前,我曾经这样编码

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
   [tableView deselectRowAtIndexPath:indexPath animated:YES];

    if(indexPath.row == 0)
    {
        FirstViewController *settingsView =[[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:nil];
        [self.navigationController pushViewController:settingsView animated:YES]; 
    }
 if(indexPath.row == 1)
    {
        SecondViewController *settingsView =[[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
        [self.navigationController pushViewController:settingsView animated:YES]; 
    }
 if(indexPath.row == 2)
    {
        ThirdViewController *settingsView =[[ThirdViewController alloc]initWithNibName:@"ThirdViewController" bundle:nil];
        [self.navigationController pushViewController:settingsView animated:YES]; 
    }

}

但是知道,我该怎么做..请帮帮我

感谢和问候
兰 git

最佳答案

关于ios - ios 5 中带有 Storyboard 的 Table ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8077613/

相关文章:

ios - 你怎么知道用户是否存在 Firebase Auth Swift IOS

objective-c - NSArray 的大小

ios - 核心数据删除不起作用

ios - 如何对 size_t 进行操作并最终得到 CGFloat?

iPhone模拟器-模拟3G连接

iphone - 未调用 UITableView 的 Dealloc

ios - 当值为 null 时,Swift 查询请求崩溃

ios - UITabBarController 背景图片设置不正确

ios - UIPageViewController Transition Style = Page curl 工作正常,Scroll 抛出索引越界?

iphone - iOS 4 中的后台应用程序*曾经*退出过吗?