Implemented macOS Support

This commit is contained in:
Alex Pawlowski
2017-02-02 03:33:32 +02:00
parent 8142974183
commit 059517d351
89 changed files with 4483 additions and 772 deletions

View File

@@ -0,0 +1,41 @@
//
// 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