在这里,我设置了描述,价格以及从 - 到的位置,但是无法设置日期和时间,如上图所示。格式面临一些问题,将日期设置在一个标题中,时间设置在另一个标题中。如果任何显示如何设置嵌套标题的链接会对我有所帮助。
提前致谢。
答案 0 :(得分:0)
是的,如图所示无法在中间添加分隔符。我也试过这个
...
private:
static CEdit m_progress;
public:
static void setProgress(std::string message);
...
}
但是在滚动tableview时面临日期视图受到干扰的问题。
答案 1 :(得分:-1)
创建一个xib文件,其中包含UIView
和标签,如附带的屏幕截图所示。
CustomHeader
的源文件,它是UIView
的子类。 CustomHeader
类映射您的xib视图。 IBOutlets
。使用ViewController
viewForHeaderInSection
方法
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
NSArray * bundleArray = [[NSBundle mainBundle] loadNibNamed:@"View" owner:self options:nil];
CustomUIClass * view = (CustomUIClass *) [bundleArray objectAtIndex:0];
return view;
}
同时覆盖heightForHeaderInSection
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 69.0f;
}
这里' 69'是xib的高度。现在你的tableview看起来像附加的截图。
像这样,您可以根据自己的要求自定义标题。