UITableViewStyleGrouped 頭部視圖和尾部視圖不懸停
UITableViewStylePlain 頭部視圖和尾部視圖懸停
1涤浇、當創(chuàng)建UIViewController添加UITableView時,
self.tableView =[[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
2魔慷、當創(chuàng)建UITableViewController時只锭,需要改變UITableViewStyle時,
使用self.tableView.style = UITableViewStyleGrouped; 會出現(xiàn)錯誤
3院尔、當創(chuàng)建UITableViewController時蜻展,需要改變UITableViewStyle時,
使用self.tableView.style = UITableViewStyleGrouped; 會出現(xiàn)錯誤
ps:
@property(nonatomic,readonly)UITableViewRowActionStylestyle;
UITableViewStylePlain和UITableViewStyleGrouped是UITableViewStyle類型召边。
查UITableViewController的SDK文檔铺呵,發(fā)現(xiàn):
Table views can have one of two styles, UITableViewStylePlain and UITableViewStyleGrouped. When you create a UITableView instance you must specify a table style, and this style cannot be changed.
可以在Xib文件的屬性下直接修改為Group或Plain。