런타임에 뷰를 만들고 해당 하위 뷰로 UITableView를 추가하고 있습니다. 나는 tableview의 델리게이트를 self로 정의했다.UITableView 대리인이 호출되지 않습니다
여전히 jQuery과 대표가
@ 인터페이스의 cViewController라고하기는 아니지만 : UIViewController에
RouteShowView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
[RouteShowView setBackgroundColor:[UIColor blueColor]];
table = [[UITableView alloc] initWithFrame:CGRectMake(0, 50, 320, 410) style:UITableViewStylePlain];
table.delegate = self;
UIButton * Go = [UIButton buttonWithType:UIButtonTypeRoundedRect];
Go.frame = CGRectMake(0, 4, 70, 42);
[Go setTitle:@"<< BACK" forState:UIControlStateNormal];
[Go addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
[Go setBackgroundColor:[UIColor blackColor]];
[RouteShowView addSubview:table];
[RouteShowView addSubview:Go];
[self.view addSubview:RouteShowView];
시도 [표 reloadData]; – Neo
'UITableView'의'datasource'가 더 중요하기 때문에 추측하고 있습니다. 'table.datasource = self.'로 시도하고'cellForRowAtIndexPath'와'numberOfRowsInSection' 메서드를 추가하는 것을 잊지 마십시오. – iNoob
또한 이것에 대해 행운이 없습니다 : ( – WakkaoW