Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

对替换某一个指定key的图片,圆角的支持有问题 #174

@ACommonChinese

Description

@ACommonChinese

左右明显被切

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.player = [[SVGAPlayer alloc] initWithFrame:CGRectMake(0, 0, 58, 65)];
    self.player.backgroundColor = UIColor.blackColor;
    self.player.center = self.view.center;
    [self.view addSubview:self.player];
    self.parser = [[SVGAParser alloc] init];
    NSString *str = @"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fup.enterdesk.com%2Fedpic%2F76%2F7b%2F57%2F767b578c5e68a890cf98b5b7e002aca8.jpeg&refer=http%3A%2F%2Fup.enterdesk.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642659725&t=eb1aa225d1a5216b671b28d5ae577c26";
    [self.player setImageWithURL:[NSURL URLWithString:str] forKey:@"avatar1"];
    
    __weak typeof(self) weakself = self;
    [self.parser parseWithNamed:@"直播中-中号" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
        weakself.player.videoItem = videoItem;
        [weakself.player startAnimation];
    } failureBlock:^(NSError * _Nonnull error) {
        NSLog(@"发生错误:%@", error);
    }];
}

效果图:
3261640068044_ pic_副本

直播中-中号.svga.zip

相同的素材在Android中播放正常

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions