开发者

Uitablecell pushing into different nibs

Hello I am trying开发者_开发知识库 to push different nibfiles into view When you click On the uitablecell it corresponds to. I have no Idea where to start.


Read UITableView class and navigation based app and see this code

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

  //and code like this

   if(indexPath.row==0)
   {
     FirstController *objFirstController=[[[FirstController alloc] initWithNibName:@"FirstView" bundle:nil] autorelease];
[self.navigationController pushViewController:objFirstController animated:YES];
   }
else
{
   SecondController *objSecondController=[[[SecondController alloc] initWithNibName:@"SecondView" bundle:nil] autorelease];
[self.navigationController pushViewController:objSecondController animated:YES];
 }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜