使用layer将图片切成圆形图片

 UIImageView *headImageView=[[UIImageView alloc]initWithFrame:CGRectMake(30, 38, 57, 57)];

    headImageView.image=[UIImage imageNamed:@"add_netdisk_book.png"];

    headImageView.layer.masksToBounds=YES;

    headImageView.layer.cornerRadius=headImageView.bounds.size.width/2;

    headImageView.layer.borderWidth=1;

    headImageView.layer.borderColor=[UIColor blackColor].CGColor;

    [self addSubview:headImageView];

    [headImageView release];

 

转载于:https://www.cnblogs.com/woaixixi/p/5213146.html

你可能感兴趣的:(javascript)