2011-11-10 59 views
2

我已經開始使用故事板,這是iOS 5中的一個新功能,所以我開始使用選項卡式應用程序,然後添加了一個表視圖控制器,並使用一些虛擬數據填充單元格,表中有4個單元,現在在每個單元的點擊,我想開一個newViewController,這將是不同勢的針對每個小區TabelViewController with ios5中的故事板

所以以前,我用這種方式

- (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]; 
    } 

} 

代碼,但知道,我該怎麼做呢..請幫助我出去

謝謝& Registers Ranjit

+0

請檢查該鏈接http://maybelost.com/2011/10 /教程故事板合的xcode-4-2-與導航控制器和 - 的TabBar控制器-part1的/ – developer9

回答