Dear Colleagues!
It is impossible to create something by default (not to get from somewhere, namely to create).
You need to create a UIImage object (as a variant of a CGImage ) with dimensions of 288 * 352 pixels.
Question: how to do it?
Dear Colleagues!
It is impossible to create something by default (not to get from somewhere, namely to create).
You need to create a UIImage object (as a variant of a CGImage ) with dimensions of 288 * 352 pixels.
Question: how to do it?
Well, like this: (creates an image of the right size and fills it with gray)
UIGraphicsBeginImageContext(CGSizeMake(288, 352)); CGRect drawRect = CGRectMake(0,0,288,352); CGContextSetRGBFillColor(UIGraphicsGetCurrentContext(), 100.0f/255.0f, 100.0f/255.0f, 100.0f/255.0f, 1.0f); CGContextFillRect(UIGraphicsGetCurrentContext(), drawRect); UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); // вот ваше изображение UIGraphicsEndImageContext(); image = nil . I'm right? How, then, to properly destroy the object of these classes? - Andrew KachalinSource: https://ru.stackoverflow.com/questions/574569/
All Articles