Skip to content

Commit c583675

Browse files
committed
Use posche demo.
1 parent 389b831 commit c583675

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

SVGAPlayer/ViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ - (void)viewDidLoad {
2626
self.aPlayer.loops = 0;
2727
self.aPlayer.clearsAfterStop = YES;
2828
SVGAParser *parser = [[SVGAParser alloc] init];
29-
[parser parseWithURL:[NSURL URLWithString:@"http://uedfe.yypm.com/assets/svga-samples/angel.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
29+
[parser parseWithURL:[NSURL URLWithString:@"http://uedfe.yypm.com/assets/svga-samples/posche.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
3030
if (videoItem != nil) {
3131
self.aPlayer.videoItem = videoItem;
3232
[self.aPlayer startAnimation];

Source/SVGAPlayer.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ - (void)clear {
5050
- (void)draw {
5151
self.drawLayer = [[CALayer alloc] init];
5252
self.drawLayer.frame = CGRectMake(0, 0, self.videoItem.videoSize.width, self.videoItem.videoSize.height);
53+
self.drawLayer.masksToBounds = true;
5354
[self.videoItem.sprites enumerateObjectsUsingBlock:^(SVGAVideoSpriteEntity * _Nonnull sprite, NSUInteger idx, BOOL * _Nonnull stop) {
5455
CALayer *spriteLayer = [[CALayer alloc] init];
5556
spriteLayer.contentsGravity = kCAGravityResizeAspect;

0 commit comments

Comments
 (0)