开发者

Push a view from a custom table view cell Xcode 4

开发者 https://www.devze.com 2023-03-19 07:51 出处:网络
I was wondering if there was a way to have the user create/delete cells in a Table View but when they click on it, every cell that they create loads the same 开发者_开发技巧view. I have the first part

I was wondering if there was a way to have the user create/delete cells in a Table View but when they click on it, every cell that they create loads the same 开发者_开发技巧view. I have the first part created but I cannot seem to get it to load a view.


Simple create a new view and push on didSelectRowAtIndexPath Delegate method of UITableView.

For ex.

- (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath{
    DetailViewController *vController = [[DetailViewController alloc]  initWithNibName:@"DetailViewController" bundle:nil];
    [self.navigationController pushViewController:vController animated:YES];
    [vController release];
}
0

精彩评论

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