如何在this image中添加“加利福尼亚”之类的描述。如何将描述添加到UITableView
0
A
回答
3
- (NSInteger)numberOfSections
{
return 1;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
if (section == 0)
return @"California";
return nil;
}
0
这是一款header.The 的UITableViewDelegate方法是:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
1
,是你的表头。部分的表格视图标题。您可以通过实现数据源方法
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
1
在你UITableViewDataSource(中的UITableView的委托)有节标题,
这种方法控制节标题标题:
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
0
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView * view = [uiview alloc]initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, 90)];
then Create UIView in UILable ,UItextView etc...
}
then
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 50;
}
相关问题
- 1. 将描述添加到android
- 2. 将类描述添加到代码?
- 3. 将描述添加到JAXB @XmlElement?
- 4. 如何将描述附加到Zend_Form_Element?
- 5. 如何将描述附加到GeoPoint
- 6. 添加列描述
- 7. 添加描述Blogger
- 8. 如何将描述添加到Django命令?
- 9. TreeView - Jtree(NetBeans)如何将描述添加到节点
- 10. Obj C:如何将描述添加到块对象?
- 11. 如何将我的错误的描述添加到perror函数
- 12. 如何将描述添加到.vssettings文件
- 13. 如何在Swashbuckle中添加API描述?
- 14. 如何描述添加到一个Excel加载项
- 15. Wordpress元描述添加到头文件
- 16. XML/XSD - 添加描述
- 17. 添加房地产描述
- 18. 向商品添加描述
- 19. 添加错误描述
- 20. 如何将AdMob广告添加到UITableView
- 21. 如何将UITableView添加到UIAlertView?
- 22. 如何将导航栏添加到UITableView
- 23. 如何将部分添加到UITableView?
- 24. 如何将阴影添加到UITableView?
- 25. 如何将单元添加到UITableView?
- 26. 如何将对象添加到UITableView中?
- 27. 如何将UITextView添加到UITableView细节
- 28. 如何添加链接的文字到Asana中的描述?
- 29. 将描述添加到Facebook应用程序
- 30. 将描述标签添加到PHP图像库
链接对于图像坏了,请更新图像。 – rptwsthi 2016-09-07 09:05:33