mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-21 11:39:43 +00:00
Merge pull request #499 from ansman/fix/implement-init-with-coder-in-lotanimatedcontrol
Implement initWithCoder: in LOTAnimatedControl
This commit is contained in:
@@ -17,15 +17,27 @@
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
_animationView = [[LOTAnimationView alloc] init];
|
||||
_animationView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_animationView.userInteractionEnabled = NO;
|
||||
[self addSubview:_animationView];
|
||||
_layerMap = [NSMutableDictionary dictionary];
|
||||
[self _commonInit];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (self) {
|
||||
[self _commonInit];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)_commonInit {
|
||||
_animationView = [[LOTAnimationView alloc] init];
|
||||
_animationView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_animationView.userInteractionEnabled = NO;
|
||||
[self addSubview:_animationView];
|
||||
_layerMap = [NSMutableDictionary dictionary];
|
||||
}
|
||||
|
||||
- (LOTComposition *)animationComp {
|
||||
return _animationView.sceneModel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user