@@ -37,38 +37,38 @@ - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
3737}
3838
3939- (IBAction )onChange : (id )sender {
40- // NSArray *items = @[
41- // @"https://github.com/yyued/SVGA-Samples/blob/master/EmptyState.svga?raw=true",
42- // @"https://github.com/yyued/SVGA-Samples/blob/master/HamburgerArrow.svga?raw=true",
43- // @"https://github.com/yyued/SVGA-Samples/blob/master/PinJump.svga?raw=true",
44- // @"https://github.com/yyued/SVGA-Samples/blob/master/TwitterHeart.svga?raw=true",
45- // @"https://github.com/yyued/SVGA-Samples/blob/master/Walkthrough.svga?raw=true",
46- // @"https://github.com/yyued/SVGA-Samples/blob/master/angel.svga?raw=true",
47- // @"https://github.com/yyued/SVGA-Samples/blob/master/halloween.svga?raw=true",
48- // @"https://github.com/yyued/SVGA-Samples/blob/master/kingset.svga?raw=true",
49- // @"https://github.com/yyued/SVGA-Samples/blob/master/posche.svga?raw=true",
50- // @"https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true",
51- // @"https://github.com/yyued/SVGA-Samples/blob/master/matteBitmap .svga?raw=true",
52- // @"https://github.com/yyued/SVGA-Samples/blob/master/matteBitmap_1.x .svga?raw=true",
53- // @"https://github.com/yyued/SVGA-Samples/blob/master/matteRect.svga?raw=true",
54- // @"https://github.com/yyued/SVGA-Samples/blob/master/mutiMatte.svga?raw=true",
55- // ];
56- // [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
57- // [parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]]
58- // completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
59- // [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
60- // if (videoItem != nil) {
61- // self.aPlayer.videoItem = videoItem;
62- // [self.aPlayer startAnimation];
63- // }
64- // } failureBlock:nil];
65- [parser parseWithURL: [NSURL URLWithString: @" https://github.com/svga/SVGA-Samples/raw/master_aep/BitmapColorArea1.svga" ] completionBlock: ^(SVGAVideoEntity * _Nullable videoItem) {
66- if (videoItem != nil ) {
67- self.aPlayer .videoItem = videoItem;
68- [self .aPlayer setImageWithURL: [NSURL URLWithString: @" https://i.imgur.com/vd4GuUh.png" ] forKey: @" matte_EEKdlEml.matte" ];
69- [self .aPlayer startAnimation ];
70- }
71- } failureBlock: nil ];
40+ NSArray *items = @[
41+ @" https://github.com/yyued/SVGA-Samples/blob/master/EmptyState.svga?raw=true" ,
42+ @" https://github.com/yyued/SVGA-Samples/blob/master/HamburgerArrow.svga?raw=true" ,
43+ @" https://github.com/yyued/SVGA-Samples/blob/master/PinJump.svga?raw=true" ,
44+ @" https://github.com/yyued/SVGA-Samples/blob/master/TwitterHeart.svga?raw=true" ,
45+ @" https://github.com/yyued/SVGA-Samples/blob/master/Walkthrough.svga?raw=true" ,
46+ @" https://github.com/yyued/SVGA-Samples/blob/master/angel.svga?raw=true" ,
47+ @" https://github.com/yyued/SVGA-Samples/blob/master/halloween.svga?raw=true" ,
48+ @" https://github.com/yyued/SVGA-Samples/blob/master/kingset.svga?raw=true" ,
49+ @" https://github.com/yyued/SVGA-Samples/blob/master/posche.svga?raw=true" ,
50+ @" https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true" ,
51+ @" https://github.com/yyued/SVGA-Samples/blob/master/rose .svga?raw=true" ,
52+ @" https://github.com/yyued/SVGA-Samples/blob/master/rose .svga?raw=true" ,
53+
54+
55+ ];
56+ [UIApplication sharedApplication ].networkActivityIndicatorVisible = YES ;
57+ [parser parseWithURL: [NSURL URLWithString: items[arc4random () % items.count]]
58+ completionBlock: ^(SVGAVideoEntity * _Nullable videoItem) {
59+ [UIApplication sharedApplication ].networkActivityIndicatorVisible = NO ;
60+ if (videoItem != nil ) {
61+ self.aPlayer .videoItem = videoItem;
62+ [self .aPlayer startAnimation ];
63+ }
64+ } failureBlock: nil ];
65+ // [parser parseWithURL:[NSURL URLWithString:@"https://github.com/svga/SVGA-Samples/raw/master_aep/BitmapColorArea1.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
66+ // if (videoItem != nil) {
67+ // self.aPlayer.videoItem = videoItem;
68+ // [self.aPlayer setImageWithURL:[NSURL URLWithString: @"https://i.imgur.com/vd4GuUh.png"] forKey:@"matte_EEKdlEml.matte"];
69+ // [self.aPlayer startAnimation];
70+ // }
71+ // } failureBlock:nil];
7272}
7373
7474- (IBAction )onSliderClick : (UISlider *)sender {
0 commit comments