我的UITableCell
标题在我的viewController
未显示。TableViewCell标题不显示
它有什么问题?
我已经拖动了TableView
和TableViewCell
但它没有显示,它保持白色。
截图:https://blazor.nl/uploads/get/19d2ed8a2662039e1104474b0426f2e0/IMG-0286
我用下面的代码
-(void) arraySetup{
imageNameArray = [NSMutableArray arrayWithArray:@[@"image1", @"image2", @"image3", @"image4"]];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return imageNameArray.count;
}
#pragma mark - UITableView DataSource Methods
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellId = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
return cell;
}
请咨询我该怎么办呢?
你连接的委托和数据源? – DonMag
是的,我做到了。 tabel和它的单元格就在第二个视图控制器中。 – Anoniem
请问您可以发布您的代码,以便快速查找相关内容 –