war*_*_fz 0 objective-c uitableview custom-cell ios
我正在尝试初始设置UITableViewCellin将显示单元格,但它不起作用.谁能帮我吗?
-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *) cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.awtxt.font = [UIFont fontWithName:@"Helvetica" size:15.0]; //i am unable to set this .awtxt is the property outlet in my custom ui table view cell named as "postCell"
}
Run Code Online (Sandbox Code Playgroud)
对我来说,当我将方法更改为UITableViewCell自定义单元格时,它可以正常工作.所以只需UITableViewCell用你的自定义替换postCell
-(void) tableView:(UITableView *)tableView willDisplayCell:(postTableViewCell *) cell forRowAtIndexPath:(NSIndexPath *)indexPath // replace "postTableViewCell" with your cell
{
cell.awtxt.font = [UIFont fontWithName:@"Helvetica" size:15.0]; //i am unable to set this .awtxt is the property outlet in my custom ui table view cell named as "postCell"
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7469 次 |
| 最近记录: |