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.
プログラムでObjectiveCで空白のpngUIImageを作成するにはどうすればよいですか(たとえば36x36ピクセル)?
ありがとう :)
画像コンテキストを開いて、何も描画せずにそのコンテンツをすぐに収集できます。これにより、空白が生成されます36x36 UIImage。
36x36
UIImage
UIGraphicsBeginImageContextWithOptions(CGSizeMake(36, 36), NO, 0.0); UIImage *blank = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();