开发者

Uitablecell pushing into different nibs

开发者 https://www.devze.com 2023-02-13 15:50 出处:网络
Hello I am trying开发者_开发知识库 to push different nibfiles into view When you click On the uitablecell it corresponds to.

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

精彩评论

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