Pan*_*ngu 6 xcode objective-c ios
如何向 UITableView 单元格中的节标题添加一些填充?
我有这个:

我有一个 NSDictionary,其键值包含一串时间。我将键值存储在 NSArray 中。
我使用 titleForHeaderInSection 而不是 viewForHeaderInSection。
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return [schedule objectAtIndex:section];
}
Run Code Online (Sandbox Code Playgroud)
但是,节标题始终向左对齐。我可以使用 viewForHeaderInSection 的 UIView 将其填充到我喜欢的位置,但是有什么方法可以为方法 titleForHeaderInSection 做到这一点吗?
| 归档时间: |
|
| 查看次数: |
3352 次 |
| 最近记录: |