So the answer is: Don't do this. Instead you can paint your overlay procedurally. Like so: (void)overlayWithColor:(UIColor *)overlayColor forState:(UIControlState)state { UIImage *baseImage = self backgroundImageForState:state; CGRect frame = CGRectZero; frame.
Size = baseImage. Size; // create a new image context UIGraphicsBeginImageContext(baseImage. Size); // get context CGContextRef context = UIGraphicsGetCurrentContext(); // draw background image baseImage drawInRect:frame; // overlay color CGContextSetFillColorWithColor(context, overlayColor CGColor); CGContextSetBlendMode(context, kCGBlendModeSourceAtop); CGContextFillRect(context, frame); // get UIImage UIImage *overlaidImage = UIGraphicsGetImageFromCurrentImageContext(); // clean up context UIGraphicsEndImageContext(); self setBackgroundImage:overlaidImage forState:state; }.
So the answer is: Don't do this. Instead you can paint your overlay procedurally. Like so: - (void)overlayWithColor:(UIColor *)overlayColor forState:(UIControlState)state { UIImage *baseImage = self backgroundImageForState:state; CGRect frame = CGRectZero; frame.
Size = baseImage. Size; // create a new image context UIGraphicsBeginImageContext(baseImage. Size); // get context CGContextRef context = UIGraphicsGetCurrentContext(); // draw background image baseImage drawInRect:frame; // overlay color CGContextSetFillColorWithColor(context, overlayColor CGColor); CGContextSetBlendMode(context, kCGBlendModeSourceAtop); CGContextFillRect(context, frame); // get UIImage UIImage *overlaidImage = UIGraphicsGetImageFromCurrentImageContext(); // clean up context UIGraphicsEndImageContext(); self setBackgroundImage:overlaidImage forState:state; }.
I've found best results out of images that fit the same aspect ratio and were reduced in size. Might not solve your problem tho.
Interesting. I'll give it a try. – Ben Lachman Feb 26 '10 at 6:55.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.