1
這段代碼附帶了新的類,是的UITableViewController的子類...self.clearsSelectionOnViewWillAppear不會編譯
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to preserve selection between presentations.
self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
但離開clearsSelectionOnViewWillAppear註釋掉拋出一個編譯錯誤。錯誤是「請求成員」clearsSelectionOnViewWillAppear'在某些不是結構或聯合「。任何想法爲什麼你有沒有解決方法?
我甚至在乎的原因是因爲沒有這一點,我的應用程序正在離開我的表格單元格上的選擇指示器(藍色背景)。
啊哈!謝謝。是的,編譯爲3.1.3。那麼,如何在3.1.3中清除選項? – 2010-04-08 20:26:32
輸入此命令而不嘗試它['self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:NO];'。 – Giao 2010-04-08 20:32:04
其中放置此代碼 – 2010-11-26 10:46:28