From e6a02939503ecad5fa2339713e134cda491c0a5e Mon Sep 17 00:00:00 2001 From: errnull Date: Wed, 16 Oct 2019 17:21:57 +0800 Subject: [PATCH] feat: Fix demo. --- SVGAPlayer/ViewController.m | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/SVGAPlayer/ViewController.m b/SVGAPlayer/ViewController.m index a2e6560..cc625fd 100644 --- a/SVGAPlayer/ViewController.m +++ b/SVGAPlayer/ViewController.m @@ -51,15 +51,15 @@ static SVGAParser *parser; @"https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true", ]; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; - // [parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]] - // completionBlock:^(SVGAVideoEntity * _Nullable videoItem) { - // [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; - // if (videoItem != nil) { - // self.aPlayer.videoItem = videoItem; - // [self.aPlayer startAnimation]; - // } - // } failureBlock:nil]; - + [parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]] + completionBlock:^(SVGAVideoEntity * _Nullable videoItem) { + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + if (videoItem != nil) { + self.aPlayer.videoItem = videoItem; + [self.aPlayer startAnimation]; + } + } failureBlock:nil]; + // [parser parseWithURL:[NSURL URLWithString:@"https://github.com/svga/SVGA-Samples/raw/master_aep/BitmapColorArea1.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) { // if (videoItem != nil) { // self.aPlayer.videoItem = videoItem; @@ -68,10 +68,10 @@ static SVGAParser *parser; // } // } failureBlock:nil]; - [parser parseWithNamed:@"heartbeat" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { - self.aPlayer.videoItem = videoItem; - [self.aPlayer startAnimation]; - } failureBlock:nil]; +// [parser parseWithNamed:@"heartbeat" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { +// self.aPlayer.videoItem = videoItem; +// [self.aPlayer startAnimation]; +// } failureBlock:nil]; } - (IBAction)onSliderClick:(UISlider *)sender {