如何在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