I have a very simple UIViewone that only draws a triangle. It implements a method UIView drawRectthat draws a figure. It works fine on iOS7, but when I run the same code on iOS8 it is not even called. Any ideas what changed on iOS8? My code in a nutshell:
@interface MyView : UIView
@end
@implementation MyView
- (instancetype)init {
self = [super init];
if (self) {
self.backgroundColor = [UIColor clearColor];
}
return self;
}
- (void)drawRect:(CGRect)rect {
}
@end
myView = [MyView new];
[self addSubview:myView];
Update
My view hierarchy:UIViewController View->Custom UILabel->MyView
This is the error message bubble, and in my opinion, it is a beak indicating something.
I used a new tool for debugging the interface, but it is not visible there. The Init method is called, drawRectno. Something must change in iOS8 because iOS7 is calling drawRect.
Update 2
Of course, I use restrictions (and Masonrypod), and that is why I did not specify a frame.
[myView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(make.superview.mas_bottom);
make.centerX.equalTo(make.superview);
make.width.equalTo(@10.0f);
make.height.equalTo(@5.0f);
}]
[myView setNeedsDisplay] , .