magnification

How to add a magnifier to custom control?

一曲冷凌霜 提交于 2019-11-27 00:39:39
问题 How to add a magnifier to custom control? Control is a child of UIView. (It's a UIWebView - but native magnification functionality doesn't work at some pages.) UPDATED: Maybe it's possible to force a draw of magnifier on UIWebView? 回答1: 1. Add the following files to your project: MagnifierView.h: // // MagnifierView.h // SimplerMaskTest // #import <UIKit/UIKit.h> @interface MagnifierView : UIView { UIView *viewToMagnify; CGPoint touchPoint; } @property (nonatomic, retain) UIView