У меня есть пользовательский UITableViewCell, который я создал в IB. Мои ярлыки отображаются, когда я не переигрываю:
- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
однако мой контент раздавлен. Я хочу, чтобы высота была 120px, поэтому у меня есть следующее:
- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ CGFloat rowHeight = 120;
return rowHeight;
}
Я не уверен, почему содержимое моего UITableViewCell внезапно исчезает?
UPDATE:
Вот как я создаю ячейку:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"ARCell";
ARObject *myARObject;
myARObject = [items objectAtIndex:indexPath.row];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"ARCell" owner:self options:nil];
cell = arCell;
self.arCell = nil;
}
UILabel *label;
label = (UILabel *)[cell viewWithTag:0];
label.text = [NSString stringWithFormat:@"%@", myARObject.username];
label = (UILabel *)[cell viewWithTag:1];
label.text = [NSString stringWithFormat:@"%@", myARObject.created_at];
label = (UILabel *)[cell viewWithTag:2];
label.text = [NSString stringWithFormat:@"%@", myARObject.articleTitle];
label = (UILabel *)[cell viewWithTag:3];
label.text = [NSString stringWithFormat:@"%@", myARObject.intro_text];
return cell;
}