我是iphone開發新手。我已經在分組表格視圖中顯示了內容列表。如何設置表格背景透明,例如我應該看到灰色(默認顏色)背景上顯示的文字,而不是白色。請幫我。謝謝。如何在iPhone中設置表背景透明?
回答
cell.backgroundColor=[UIColor clearColor]
這對我工作的罰款。
的UITableView繼承UIView的一個 '阿爾法' 屬性,以便嘗試改變這種:)
我正在使用分組表如何更改第一個表的Alpha值 – Warrior 2010-02-13 12:06:16
因此,您希望一個表中的第一個組是透明的還是實際上有幾個表? – willcodejavaforfood 2010-02-13 12:43:01
我想要一個表中的第一組透明 – Warrior 2010-02-13 12:44:52
table.backgroundColor = [UIColor clearColor]
馬爾科
在iOS 6中,這似乎還不夠。我同時設置,
menuTable.backgroundColor = [UIColor clearColor];
if ([menuTable respondsToSelector:@selector(setBackgroundView:)]) { // only after 3.2
[menuTable setBackgroundView:nil];
}
self.view.layer.backgroundColor = [UIColor clearColor].CGColor;
適用於iOS 9
cell.backgroundColor = [UIColor clearColor];
cell.backgroundView = nil;
table.backgroundView = nil;
這對我的作品。
- 1. 設置CGContext透明背景
- 2. 設置透明背景Win32
- 3. 設置透明背景
- 4. 設置透明背景
- 5. 如何設置UITableViewCell背景不透明?
- 6. 如何設置SurfaceView背景透明
- 7. 我如何設置透明背景?
- 8. 如何爲DataGrid設置透明背景?
- 9. 設置在android中透明背景alertdialog
- 10. 如何在列表框中設置屬性背景「透明」
- 11. 如何設置表單在c#中具有透明背景?
- 12. Emacs,hl線條背景。如何設置透明背景顏色?
- 13. iPad/iPhone uiSearchbar透明背景
- 14. 設置形狀背景透明在android
- 15. 如何在VB.Net中爲WebBrowser設置透明背景顏色?
- 16. 如何在翻譯動畫android中設置透明背景?
- 17. 如何在Qt中設置QTableWidget背景透明?
- 18. 如何在winRT中設置webview的透明背景?
- 19. 如何在Android中將AutoCompleteTextView下拉背景設置爲透明?
- 20. 如何在使用Mono的GTK#TextView中設置透明背景?
- 21. 將JPanel背景設置爲透明
- 22. 設置菜單背景是不透明
- 23. 爲背景設置常量半透明
- 24. AChartEngine設置背景和邊距透明
- 25. Ho將JxBrowser背景設置爲透明
- 26. Cocos3d:將CC3Scene背景設置爲透明
- 27. 爲QWebView設置透明背景
- 28. UILabel設置透明背景顏色?
- 29. 將SpenSurfaceView背景設置爲透明
- 30. 將jInternalFrame背景設置爲透明
即使將背景設置爲「清除顏色」,單元格在故事板中被標記爲不「不透明」。 (XCode 5) – Matt 2013-10-17 22:51:31