보기에서보기 기반 응용 프로그램과보기에 UITableview가 있습니다. 테이블 뷰를 클릭 할 때 dataSource, delegate 및 tableView를 "File 's Owner"로 설정합니다. 파일 소유자를 클릭합니다. TableView를 테이블 뷰로 설정하고, 뷰를보고, 테이블 뷰를 데이터 소스로, 테이블 뷰를 위임합니다. 아울렛. 나는 다음과 같은 오류를 얻을 시뮬레이터에 대한 응용 프로그램을 실행할 때보기 기반 응용 프로그램 내 UItableview
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)videoView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)videoView:(UITableView *)videoView numberOfRowsInSection:(NSInteger)section {
return 0;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)videoView:(UITableView *)videoView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [videoView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
return cell;
}
- (void)tableView:(UITableView *)videoView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
는 "numberOfRowsInSection :있는 tableView을] : 인식 할 수없는 선택기 인스턴스에 전송 0x6029710 "
은 내가 tableviews 다른 구현시 필요한 느낌을 얻을 탐색 기반 응용 프로그램이 아닌보기 기반 응용 프로그램에 사용됩니다. 누군가가 나를 올바르게 안내하기 위해해야 할 일을 안내 할 수 있다면 매우 감사 할 것입니다. 감사합니다.
맞았습니다. 문제가 해결되었습니다. – UnlimitedMeals
그레이트 - 체크 표시로 가장 좋아하는 답을 표시하십시오 :) –