Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
画像がスケーリングされ、タイル化されているように、UIImageView に UIImage を表示することは可能ですか?
たとえば、実際の解像度の 2 倍にスケーリングする必要がありますが、UIImageView のフル サイズでタイル表示します。
これは実行可能ですか?
これはうまくいくはずです:
UIImage *image = [UIImage imageNamed:@"tile"]; UIImage *newImage = [UIImage imageWithCGImage:[image CGImage] scale:0.5 orientation:image.imageOrientation]; [self.myImageView setBackgroundColor:[UIColor colorWithPatternImage:newImage]];