LayoutSubviews in an endless loop on iOS 8 GM

My application subclasses a UITableViewCelland implements layoutSubviewsto change cell width contentView, for example:

- (void)layoutSubviews {
    [super layoutSubviews];
    // position subviews...
    CGRect frame = [[self contentView] frame];
    frame.size.width -= 20;
    [[self contentView] setFrame:frame]; 
}

When you run this code with an iOS 8 simulator and Xcode 6 GM seed, this causes an endless loop . However, when working on a real iPhone or iPad running iOS 8 GM, it doesnโ€™t work as in previous versions of iOS.

At first, I thought the difference was compiler optimization, but the simulator goes in cycles in the debug configuration and release configuration.

Questions

  • Why is there a difference between iOS 8 GM and a simulator?
  • Is this a critical mistake? I am very reluctant to release an application that detects a potentially serious error, even if I cannot play it on the device.
  • , , , , iOS 7 6?
+4
1

- iOS 8. , . , UITableViewCell, , iOS8. , contentView.frame layoutSubviews ( ).

subview contentView frame. , contentView ( ).

+4

All Articles