UIImage *image = (UIImage *) [info valueForKey:UIImagePickerControllerOriginalImage];
NSLog(@"%f %f %f %f ", (image.size.width/9), (image.size.height/16), (568/image.size.height), (round((568/image.size.height) * image.size.width)));
if((image.size.width/9)<(image.size.height/16)){
imageLoad.frame = CGRectMake(0, 0, 320, round((320/image.size.height) * image.size.height));
}
else if((image.size.width/9)>(image.size.height/16)){
imageLoad.frame = CGRectMake(0, 0, round((568/image.size.height) * image.size.width), 568);
}
else{
imageLoad.frame = CGRectMake(0, 0, round((568/image.size.height) * image.size.width), 568);
}
NSLog(@"%f %f", imageLoad.frame.size.width, imageLoad.frame.size.height);
imageLoad.hidden = NO;
imageLoad.image = image;
UIImageView *imageLoad
を使用して のサイズを変更したところ、 のサイズで表示されるCGRectMake
と思っていました。しかし、うまくいきませんでした。私は何をすべきか?UIImage *image
UIImageView *imageLoad