UIImage *image = [UIImage imageNamed:@"playing"];
_layerView.layer.contents = (__bridge id)image.CGImage;
_layerView.layer.contentsCenter = CGRectMake(0.25, 0.25, 0.5, 0.5);
//同样可以设置显示的图片范围
//不过此处略有不同,这里的四个值均为0-1之间;对应的依然是写x,y,widt,height
UIImage *image = [UIImage imageNamed:@"playing"];
_layerView.layer.contents = (__bridge id)image.CGImage;
_layerView.layer.contentsCenter = CGRectMake(0.25, 0.25, 0.5, 0.5);
//同样可以设置显示的图片范围
//不过此处略有不同,这里的四个值均为0-1之间;对应的依然是写x,y,widt,height