我的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
請問您可以發佈您的代碼,以便快速查找相關內容 –