所以我有一个自定义uiview包含uiimageview的按钮。在uiview中的uiimageview也在按钮内显示uiimage模糊
UIButton *myButton = [[UIButton alloc] init];
myButton.frame = CGRectMake(0, 0, 29, 29);
UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 29, 29)];
UIImage *myImage = [UIImage imageNamed:@"sexy-pic-of-me"];
UIImageView *myImageView = [[UIImageView alloc] initWithImage:myImage];
myImageView.frame = CGRectMake(0,0,29,29);
[myView addSubview:myImageView];
[myButton addSubview:myView];
[self.view addSubview: myButton];
无论增大或减小大小,我的图像都很模糊。我在这里做错了什么?
可能是因为您的图片尺寸不是1:1的比例,并且因为尺寸较大或很小。 – Roecrew
你的图像的原始尺寸是什么? – Stonz2
图片尺寸为29X29 – marshy101