Merge branch '2.3.5-dev' into 2.5.1-dev

This commit is contained in:
errnull
2019-09-29 20:16:28 +08:00

View File

@@ -37,15 +37,32 @@
@implementation SVGAPlayer
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.contentMode = UIViewContentModeTop;
- (instancetype)init {
if (self = [super init]) {
[self initPlayer];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
[self initPlayer];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
if (self = [super initWithCoder:aDecoder]) {
[self initPlayer];
}
return self;
}
- (void)initPlayer {
self.contentMode = UIViewContentModeTop;
self.clearsAfterStop = YES;
}
- (void)willMoveToSuperview:(UIView *)newSuperview {
[super willMoveToSuperview:newSuperview];
if (newSuperview == nil) {