我正在计算高度和宽度的图像值,并使用 if 条件检查 imagsize 是否可用。如果不是,那么我正在为 UIImageView 大小分配一些值。但是当我在 if 条件下检查图像大小时,我得到了这个错误 value of type CGSize is not contextually convertible to bool
CGSize imageSize = CGSizeMake(350 * widthRatio, height);
if(imageSize){
mmageView=[[UIImageView alloc]init];
CGRect frame = mmageView.frame; frame.size = imageSize; mmageView.frame = frame;
}else{
mmageView=[[UIImageView alloc]initWithFrame:CGRectMake(50,50,150,150)];
}