これいつもcontentModeいじったり、frame.size.widthいじったりして忘れてしまう。
備忘録としてポスト
1 2 3 4 5 6 7 8 9 10 |
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; |