画像のサイズを縦向きから横向きに変更する最良の方法は何ですか?
デバイスを回転させたときに画像を変更するのが最善の方法ですか?またはIBの自動サイズ変更の座標を使用しますか?
全てに感謝!
よろしくお願いします
このように、画像ビューに自動サイズ変更マスクを追加する必要があります
UIImageView *imageView = [[UIImageView alloc]initWithFrame:self.view.frame];
imageView.contentMode = UIViewContentModeScaleAspectFill;
imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:imageView];
[imageView release];
何が最善の方法かわかりません。私はこれが好きです
imageView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;