如何将文本标签移动到表格视图单元格的顶部?

时间:2017-03-04 21:41:58

标签: objective-c uitableview uilabel cell

我一直在尝试将textLabel移动到表格视图单元格的顶部,但它不会移动。如何将textLabel移动到单元格的顶部?

这是我的代码:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];

cell.textLabel.text = [[feeds objectAtIndex:indexPath.row]     objectForKey:@"title"];
cell.textLabel.font = [UIFont fontWithName:@"Baskerville" size:25.0];
cell.textLabel.frame = CGRectMake(15.0, 41.0, 257.0, 97.0);


[cell.textLabel setTextColor:[UIColor blackColor]];

[cell.textLabel setNumberOfLines:5];

0 个答案:

没有答案
相关问题