DTLoupeView Class Reference
| Inherits from | UIView |
| Declared in | DTLoupeView.h |
Overview
DTLoupeView represents the “magnifying glass” shown when positioning a caret or ranged selection. It has three different styles: the regular round loupe, a ranged selection loupe with an arrow at the bottom and a rectangual loupe without arrow.
You should not create instances of DTLoupeView, but retrieve a reference to the shared loupe instance via sharedLoupe.
Tasks
Getting the Shared Loupe
Presenting the Loupe
Changing the Loupe Style
-
seeThroughModeproperty -
styleproperty -
magnificationproperty -
touchPointOffsetproperty -
magnifiedImageOffsetproperty
Getting Information
-
targetViewproperty -
– isShowing
Properties
magnification
The magnification factor of the loupe, defaults to 1.2
@property (nonatomic, assign) CGFloat magnificationDeclared In
DTLoupeView.hmagnifiedImageOffset
Different loupes have a different vertical offset for the magnified image (otherwise the touchpoint = equals the centre of maginified image). Setting the loupe style also sets the appropriate offset. This property can be used to customize the offset
@property (nonatomic, assign) CGPoint magnifiedImageOffsetDeclared In
DTLoupeView.hseeThroughMode
See-Through Mode is used by Apple if the touch point leaves the visible area of editing views. This makes the loupe slightly translucent and does not display a magnified image.
@property (nonatomic, assign) BOOL seeThroughModeDeclared In
DTLoupeView.hstyle
The loupe style.
@property (nonatomic, assign) DTLoupeStyle styleDiscussion
Available loupe styles are:
- DTLoupeStyleCircle
- DTLoupeStyleRectangle
- DTLoupeStyleRectangleWithArrow
Declared In
DTLoupeView.htargetView
The target view. This determines the coordinate system in which touchPoint is referring to.
@property (nonatomic, WEAK) UIView *targetViewDeclared In
DTLoupeView.htouchPoint
Moves the loupe to be showing the location at the current touch point
@property (nonatomic, assign) CGPoint touchPointDeclared In
DTLoupeView.htouchPointOffset
A static offset to apply to the touch point. Setting the loupe style resets this to default CGSizeZero.
@property (nonatomic, assign) CGSize touchPointOffsetDeclared In
DTLoupeView.hInstance Methods
dismissLoupeTowardsLocation:
Dismisses the loupe with an animation towards a location
- (void)dismissLoupeTowardsLocation:(CGPoint)locationParameters
- location
The point to animate the dismissal towards
Declared In
DTLoupeView.h