2013-03-18 36 views
-6

我使用monotouch開發iPhone應用程序。我怎麼可以在我的UITableView細胞的方式,看起來這樣的形象:創建像iPhone設置應用程序的UITableView單元格背景?

enter image description here

是他們的背景只是被設置爲背景圖片的圖片?或者有另一種方法讓細胞看起來像這樣?

+2

你不會浪費時間閱讀編程指南,是嗎? – vikingosegundo 2013-03-18 14:17:22

+0

https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html – vikingosegundo 2013-03-18 14:18:54

+0

我不知道高昂費率的原因。但是,感謝所有答案 – 2013-03-18 14:52:07

回答

1

它們是所謂的Grouped cells,以UITableView中的分組格式顯示。

只需將'樣式'選項從Plain更改爲Grouped即可在Interface Builder中更改UITableView的樣式。

或者,也可以在代碼中創建它像這樣:

UITableViewController *groupedTableView = [[UITableViewController alloc] initWithStyle:UITableViewStyleGrouped]; 

在一個UITableView 編組單元的例子可以是以下:

enter image description here

作爲相對於一個普通風格,類似於以下內容:

enter image description here

0

表視圖具有樣式。

您可以通過下面的代碼創建一個tableViewController:

UITableViewController *myTableViewcontroller = [[UITableViewController alloc] initWithStyle:UITableViewStyleGrouped]; 
相關問題