1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-03 09:57:46 +01:00
Telegram/Telegraph/TGPhotoCropView.h
2015-10-01 19:19:52 +03:00

50 lines
1.8 KiB
Objective-C

#import <UIKit/UIKit.h>
@interface TGPhotoCropView : UIControl
@property (nonatomic, assign) UIInterfaceOrientation interfaceOrientation;
@property (nonatomic, strong) UIImage *image;
@property (nonatomic, assign) UIImageOrientation cropOrientation;
@property (nonatomic, assign) CGRect cropRect;
@property (nonatomic, assign) CGFloat rotation;
@property (nonatomic, readonly) bool hasArbitraryRotation;
@property (nonatomic, readonly) bool isAspectRatioLocked;
@property (nonatomic, readonly) CGFloat lockedAspectRatio;
@property (nonatomic, readonly) bool isTracking;
@property (nonatomic, readonly) bool isAnimating;
@property (nonatomic, readonly) bool isAnimatingRotation;
@property (nonatomic, copy) void(^croppingChanged)(void);
@property (nonatomic, copy) void(^interactionBegan)(void);
@property (nonatomic, copy) void(^interactionEnded)(void);
- (instancetype)initWithOriginalSize:(CGSize)originalSize hasArbitraryRotation:(bool)hasArbitraryRotation;
- (void)setSnapshotImage:(UIImage *)snapshotImage;
- (void)setSnapshotView:(UIView *)snapshotView;
- (void)setBackdropImage:(UIImage *)backdropImage;
- (void)animateTransitionIn;
- (void)animateTransitionOut;
- (void)transitionInFinishedAnimated:(bool)animated completion:(void (^)(void))completion;
- (void)performConfirmAnimated:(bool)animated;
- (void)performConfirmAnimated:(bool)animated updateInterface:(bool)updateInterface;
- (void)setRotation:(CGFloat)rotation animated:(bool)animated;
- (void)rotate90DegreesCCWAnimated:(bool)animated;
- (void)setLockedAspectRatio:(CGFloat)aspectRatio performResize:(bool)performResize animated:(bool)animated;
- (void)unlockAspectRatio;
- (void)resetAnimated:(bool)animated;
- (UIView *)cropSnapshotView;
- (CGRect)cropRectFrameForView:(UIView *)view;
- (UIImage *)croppedImageWithMaxSize:(CGSize)maxSize;
- (void)_layoutRotationView;
@end