The fact that layoutSubviews gets called by a child UIScrollView is very unfortunate, but there's an (ugly) workaround:

@interface MyClass : UIView {
    BOOL reallyNeedsLayout_;
}
@end

@implementation MyClass

- (void)setNeedsLayout
{
    [super setNeedLayout];
    reallyNeedsLayout_ = YES;
}

- (void)setFrame:(CGRect)rect
{
    [super setFrame:rect];
    reallyNeedsLayout_ = YES;
}

- (void)layoutSubviews
{
    if (!reallyNeedsLayout_) return;
    reallyNeedsLayout_ = NO;

    // Do layouting.
}
@end


Not the best solution but seems to work reasonably well.

When to use layoutSubview in iOS
I've gotten my self my first mountain bike, along with a Bike computer. This needs to be setup, but im really not sure how i do this. The wheel size of the bike is a 27,5 inches. The bike computer is a Bontrager Trip 100, that comes with the following wheel settings:

700:23, 700:25, 700:28, 700:32, 700:35, 700:38, 29:2.1, 29:2.2, 26:1.5, 26:1.9, 26:2.0, 26:2.1, 26:2.2, 26:2.3

One thing is what setting to enter on the computer, but im also unsure about where i should place the sensor and receiver on the wheel. I believe it must matter if i place the sensor and receiver near the center of the wheel, or if i place it need the edge.   
