我正在设置UITableView
分组图像,但它显示了整个表我想它应该在第二个表中应该像 它应该只背景图像区域的单元格和表格不是灰色边框在第二个表谢谢。UITableView分组背景图片
0
A
回答
4
使用以下代码。
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];
对于另一种方式来设置分组UITableView
backgroung图像读取This documentation.
1
UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"TableViewBackground.png"]];
[tempImageView setFrame:self.tableView.frame];
self.tableView.backgroundView = tempImageView;
[tempImageView release];
-2
而不是给背景图像以table.Provide背景图像/色彩到细胞。
cell.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];
since colorWithPattern is very expensive which causes memory leak,avoid using colorWithPatternImage
instead you can use
cell.backgroundColor=[UIColor initWithRed:0.25 green:0.25 blue:0.25 alpha:1];
//change the RGB as per the image
相关问题
- 1. UITableView背景图片
- 2. 分组UITableView的部分背景
- 3. UITableView部分背景?
- 4. 滚动UITableView的背景图片?
- 5. 分组的UITableView透明背景 - iPhone
- 6. iPhone - UITableView分组时清晰的背景?
- 7. 背景为iphone sdk分组的uitableview
- 8. UITableView(分组样式)背景颜色
- 9. 如何使UIViewController背景看起来像分组UITableView的背景?
- 10. 背景图片
- 11. 背景图片
- 12. 背景图片
- 13. 背景图片上的背景图像
- 14. 无法摆脱分组背景颜色在分组UITableView
- 15. 分组UITableView上的自定义背景图像
- 16. UITableView的背景图像 - iOS
- 17. 设计UITableView背景图像
- 18. UITableView背景图像问题
- 19. 集UITableView的背景视图
- 20. 如何为分组表格视图设置背景图片?
- 21. Jumbotron背景图片
- 22. QLineEdit背景图片
- 23. JOptionPane背景图片
- 24. UIProgressView背景图片
- 25. 多背景图片
- 26. JPanel背景图片
- 27. Bootstrap背景图片
- 28. UITableViewController背景图片
- 29. AndEngine背景图片
- 30. Joomla背景图片?
但它添加侧形象也为分组表 – 2013-02-25 06:45:06
@ NaziaJan-试试这个代码???可能解决您的问题:) – iPatel 2013-02-25 06:46:27
它不工作 – 2013-02-25 06:54:40