mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
42 lines
889 B
Objective-C
42 lines
889 B
Objective-C
//
|
|
// ViewController.m
|
|
// Example for lottie-macos
|
|
//
|
|
// Created by Oleksii Pavlovskyi on 2/2/17.
|
|
// Copyright © 2017 Brandon Withrow. All rights reserved.
|
|
//
|
|
|
|
#import "ViewController.h"
|
|
#import <Lottie/Lottie.h>
|
|
|
|
@interface ViewController ()
|
|
|
|
@property (nonatomic, strong) LAAnimationView *lottieLogo;
|
|
|
|
@end
|
|
|
|
@implementation ViewController
|
|
|
|
- (void)viewDidLoad {
|
|
[super viewDidLoad];
|
|
|
|
self.lottieLogo = [LAAnimationView animationNamed:@"LottieLogo1"];
|
|
self.lottieLogo.contentMode = LAViewContentModeScaleAspectFill;
|
|
self.lottieLogo.frame = self.view.bounds;
|
|
self.lottieLogo.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
|
|
|
[self.view addSubview:self.lottieLogo];
|
|
}
|
|
|
|
- (void)viewDidAppear {
|
|
[super viewDidAppear];
|
|
[self.lottieLogo play];
|
|
}
|
|
|
|
- (void)viewDidDisappear {
|
|
[super viewDidDisappear];
|
|
[self.lottieLogo pause];
|
|
}
|
|
|
|
@end
|