mirror of
https://github.com/svga/SVGAPlayer-iOS.git
synced 2025-10-21 07:29:14 +08:00
Merge branch '2.3.5-dev' into 2.5.1-dev
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user