이 코드는 UITableView를 채울 수 있으며 numberOfRowsInSection을 반환하는 코드는 정상적으로 작동합니다. cellForRowAtIndexPath 부분에서 appDelegate를 사용하는 선택기가 호출되지 않습니다. 여기서 뭐가 틀린거야?Selector가 numberOfRowsInSection에서 호출되지만 cellForRowAtIndexPath에서는 호출되지 않습니다.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
VIP_GeburtstagAppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate getEntriesForDate:section];
return appDelegate.namesForDay.count;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
VIP_GeburtstagAppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate getEntriesForDate:indexPath.section];
appDelegate.namesForDay.count의 값은 무엇입니까? 이 값이 0이면 cellForRowAtIndexPath가 호출되지 않습니다. – Krishnan