I have a UIWebView with black background and white (light gray) text. It's almost unusable while selecting text to copy, because the "mirror" is on white background color by default. Is there any way how to change this behavior?
Screenshot:
I have a UIWebView with black background and white (light gray) text. It's almost unusable while selecting text to copy, because the "mirror" is on white background color by default. Is there any way how to change this behavior?
Screenshot:
as Ben Gottlieb have already answered the question before me:
- (void) drawRect: (CGRect) rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGRect bounds = self.bounds;
CGImageRef mask = [UIImage imageNamed: @"loupeMask"].CGImage;
UIImage *glass = [UIImage imageNamed: @"loupeImage"];
CGContextSaveGState(context);
CGContextClipToMask(context, bounds, mask);
CGContextFillRect(context, bounds);
CGContextScaleCTM(context, 2.0, 2.0);
//draw your subject view here
CGContextRestoreGState(context);
[glass drawInRect: bounds];
}
for more details please check iPhone, reproduce the magnifier effect