0

I get a strange issue when using my app on iOS 8.1.1 and 8.1.2 (iPhone 6). Some components (UISwitch and UISemgentedControl) in my menu cells have disappeared. I can't reproduce it on simulator, since I did not find iOS 8.1.1 sim on xcode 6.1 or 6.1.1 (GM seed), and it works well on iOS 8.1 (both simulator and device)

In my UITableView I get many differents cells type, and I load them like this in tableview:CellForRow:AtIndexPath:

[[NSBundle mainBundle] loadNibNamed:@"SubMenuCellSwitch" owner:self options:nil];

[[NSBundle mainBundle] loadNibNamed:@"SubMenuCellSegment" owner:self options:nil];

I'm using Autolayout in the cells'xib, but I still get the same issue if I remove it. Every subviews of my cells are visible (UIImageView and UILabel) except the switch and segmentedControl !

Does anyone get a similar issue on iOS 8.1.1 ? or have a possible answer ?

KIDdAe
  • 2,714
  • 2
  • 22
  • 29

1 Answers1

0

The error seems to be that since iOS 8.1.1, I'm not entering one of my if statement.

The cast on NSNumber object fails.

When debugging, I got this on iOS 8.1 :

(lldb) po quality
{
    segment = 1;
    title = "Quality";
}
(lldb) p (BOOL)[quality valueForKey:@"segment"]
(BOOL) $0 = YES
(lldb) p (BOOL)[[quality valueForKey:@"segment"] boolValue]
(BOOL) $1 = YES

But here is what I got on iOS8.1.1

(lldb) po quality
{
    segment = 1;
    title = "Quality";
}
(lldb) p (BOOL)[quality valueForKey:@"segment"]
(BOOL) $2 = NO
(lldb) p (BOOL)[[quality valueForKey:@"segment"] boolValue]
(BOOL) $3 = YES

and my if statement was :

if ([quality valueForKey:@"segment"]) {

}
KIDdAe
  • 2,714
  • 2
  • 22
  • 29