2
A
回答
-1
its too much easy dude.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
for(UIView *view in [tableView subviews])
{
if([[[view class] description] isEqualToString:@"UITableViewIndex"])
{
[view performSelector:@selector(setIndexColor:) withObject:[UIColor whiteColor]];
//give color which you want
}
}
static NSString *MyIdentifier = @"MyIdentifier";
//go further with table cell design...
}
+0
這是很糟糕的做法,可能會被Apple拒絕。如果蘋果在新的iOS版本中更改其TableView的內部實現,它將失敗。 – Vlad
1
可以使用指定的UITableView屬性:
tableView.sectionIndexColor = [UIColor brownColor];
tableView.sectionIndexBackgroundColor = [UIColor whiteColor];
tableView.sectionIndexTrackingBackgroundColor = [UIColor blueColor];
與底層的TableView層亂搞可能會拒絕您的應用程序,如果蘋果改變了他們的UITableView的實現可能會斷裂。
相關問題
- 1. UITableView透明
- 2. ios uitableview部分索引
- 3. UINavigationController透明UITableView下
- 4. iPhone上的透明UITableView?
- 5. 在狀態欄中的iOS 4.3透明PNG是不透明的
- 6. iOS透明ViewController
- 7. 透明度iOS
- 8. 引導模態是透明的 - 不透明度不工作
- 9. 如何爲UITableView中的部分索引欄設置透明背景?
- 10. iOS UIButton始終是透明的
- 11. 在UITableView中固定透明標頭
- 12. 層索引和不透明度問題
- 13. 創建自定義UITableView索引iOS
- 14. UITableView - 所選索引的sectionIndexColor
- 15. iOS 7 UITableView使用透明導航欄和工具欄
- 16. UITableView索引
- 17. ABPeoplePickerNavigationController UITableView索引
- 18. iOS的透明背景WKWebView
- 19. 差異透明度的iOS
- 20. 分組的UITableView透明背景 - iPhone
- 21. 對透明UITableView和圓角的陰影
- 22. 半透明UITableViewCell分組的UITableView?
- 23. Android的透明圖片不是透明
- 24. 如何確定索引模式SDL_Surface是否具有透明度?
- 25. 明確(半透明)的UIBarButttonItem IOS 5
- 26. Python的透明弱引用
- 27. 引導程序頭不是不透明
- 28. uitableview自定義透明標題
- 29. iOS如何使透明視圖的子視圖不透明?
- 30. iOS 5黑色透明UIAlertView
如果將附件視圖設置爲UITableViewCellAccessoryNone會發生什麼情況。配件消失了嗎? –
右側的索引字母仍然有表格的背景,而不是純白色 –