내가 UITableViewCell 및 UItableView 하나의 view.UnableView의 특정 행을 클릭합니다, 그것은 anotherViewController.But에 navigate to navigate to otherViewController.But를 탐색 할 수 없습니다 UITableViewCell 클릭 . 어떻게 이럴 수 있을까 ?? jQuery과에 대한UITableViewCell 및 UITableView otherviewcontroller 내비게이션
이 코드를 사용하고 있습니다 :
- -(void)pushView1:(id)sender{ if(edController == nil) edController = [[EditableDetailCell alloc] initWithNibName:@"EditableDetailCell" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:edController animated:YES]; } - (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; UITableViewCell *tbcel; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; } cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; tbcel.accessoryType = UITableViewCellAccessoryDisclosureIndicator; tbcel.layer.cornerRadius = 15; tbcel.text = aBook.Name; switch(indexPath.section) { case 0: cell.text = aBook.Address; break; case 1: cell.text = aBook.Phone; break; case 2: cell.text = aBook.Purchase; } return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if(edController == nil) edController = [[EditableDetailCell alloc] initWithNibName:@"EditableDetailCell" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:edController animated:YES]; }![enter image description here][1]
내가있는 UITableViewCell을 위해 무엇을해야합니까?
UITableViewCell은 바로 테이블보기의 일부입니까? 그렇다면 별도로 조치를 취해야하는 이유 – visakh7
Tableview에 포함되지 않은 UiTableViewCell은 View Through 인터페이스 빌더 라이브러리에 별도로 삽입됩니다. – Ketan
IB 또는 기타에서 온 것이 든 상관 없습니다. UITableViewCell이 목적이 아닙니다. 아래 내 대답을 참조하십시오. – Xiao