DZMagnifyingView Documentation Center

Table of Contents

DZMagnifyingView Class Reference

DZMagnifyingView Class Reference

Overview

This is a UIView subclass that acts like a magnifying glass.

Discussion

You can initialize this class like an ordinary view with one caveat: the width and height should be the same, the behavior is unknown otherwise.

DZMagnifyingView

Methods

Properties

DZMagnifyingView

show

Don't call -addSubview: with this view as the arguement manually on targetView, call this instead once you have set closeupRadius, closeupCenter and targetView.

- (void)show
Return Value
Type: void
Discussion
You should set the center of the magnifying glass before calling this (or set the frame, just move it somewhere).

hide

Don't call -removeFromSuperview manually, call this instead.

- (void)hide
Return Value
Type: void

closeupRadius

The radius of what you want to magnify. Probably should be smaller than the size of the magnifying view if you want to magnify something

@property (nonatomic) CGFloat closeupRadius
Type
CGFloat
Attributes
nonatomic

closeupCenter

The center of what you want to magnify.

@property (nonatomic) CGPoint closeupCenter
Type
CGPoint
Attributes
nonatomic

targetView

The actual view you want to magnify.

@property (nonatomic) UIView *targetView
Type
UIView *
Attributes
nonatomic
Discussion
If you want to update the cache of the view (something has changed on screen since you last set the targetView), just set this again with the same view. The device doesn't perform well automatically recaching everyframe or so, or even whenever you change the center of this view, so we require you to tell us to cache it instead.