The same code works well from iOS 9.0 to iOS 13.1.2, but stuck in iOS 13.2 beta1.
When layout subviews called, it goes recursive and cpu goes to 100%.
Step to reproduce:
1. Subclass a UITextView
2. Set some text
3. Set font or textColor in layoutSubviews method
4. Add this view to the screen
Here's the code:
#import <UIKit/UIKit.h>
@interface TYTextView : UITextView
@end
@implementation TYTextView
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
self.text = @"Some text";
}
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
self.font = [UIFont systemFontOfSize:13];
self.textColor = [UIColor redColor];
}
@end