これいつもcontentModeいじったり、frame.size.widthいじったりして忘れてしまう。 備忘録としてポスト UIImageViewのサイズ変更 //UIImage作成 UIImage* myimage =[UIImage imageNamed:@"hoge.jpg"]; //UIImageView作成 UIImageView* imageView =[[UIImageView alloc]initWithImage:myimage]; CGRect rect = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); imageView.frame = rect;
![[Objective-c]UIImageViewのサイズを変える – o24ブログ](https://cdn-ak-scissors.b.st-hatena.com/image/square/8d71ff5111e05619a10d29bb40d7aebaa75c8fbc/height=288;version=1;width=512/https%3A%2F%2Fs0.wp.com%2Fi%2Fblank.jpg)