开发者

self.clearsSelectionOnViewWillAppear will not compile

开发者 https://www.devze.com 2022-12-25 22:33 出处:网络
This bit of code comes with new classes that are subclasses of UITableViewController... - (void)viewDidLoad {

This bit of code comes with new classes that are subclasses of UITableViewController...

- (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;
}

But leaving the clearsSelectionOnViewWillAppear uncommented throws a 开发者_如何学Pythoncompile error. The error is "request for member 'clearsSelectionOnViewWillAppear' in something not a structure or union". Any ideas as to why or do you have a workaround?

The reason I even care is because without this bit, my app is leaving the selection indicator (blue background) on my table cells.


Are you compiling for 3.1.3 (or earlier) or 3.2? clearsSelectionOnViewWillAppear is a property available in the 3.2 and newer SDK.

0

精彩评论

暂无评论...
验证码 换一张
取 消