Search code examples
iosuitableviewcocoa-touchuikituistoryboard

Is ios7 UITableViewController's Clear on Appearance broken (from Storyboard)?


Using Storyboards in XCode5 for iOS7, I unchecked the "Clear on Appearance" checkbox for a UITableViewController. Using the version editor, I could see that the actual text in the file reacted accordingly (btw, is there a better way to see "source" of the storyboard?). But when I added

-(void) viewDidLoad {
    [super viewDidLoad];
    NSLog(@"clear on appear %d", self.clearsSelectionOnViewWillAppear);
}

It always showed as 1 (YES). Regardless of on or off in the storyboard. To get the desired affect, I had to add:

self.clearsSelectionOnViewWillAppear= NO;

to that method. Did I misunderstand the way this was supposed to work? Or is it broken?


Solution

  • Yes, seems like it is broken.

    This works on viewDidLoad:

    self.clearsSelectionOnViewWillAppear = NO;