forked from shaojiankui/JKCategories
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UIView+Genie.h
43 lines (33 loc) · 1.26 KB
/
UIView+Genie.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// UIView+Genie.h
// BCGenieEffect
//
// Created by Bartosz Ciechanowski on 23.12.2012.
// Copyright (c) 2012 Bartosz Ciechanowski. All rights reserved.
//
// An OSX style genie effect inside your iOS app.
//https://github.com/Ciechan/BCGenieEffect
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, BCRectEdge) {
BCRectEdgeTop = 0,
BCRectEdgeLeft = 1,
BCRectEdgeBottom = 2,
BCRectEdgeRight = 3
};
@interface UIView (Genie)
/*
* After the animation has completed the view's transform will be changed to match the destination's rect, i.e.
* view's transform (and thus the frame) will change, however the bounds and center will *not* change.
*/
- (void)genieInTransitionWithDuration:(NSTimeInterval)duration
destinationRect:(CGRect)destRect
destinationEdge:(BCRectEdge)destEdge
completion:(void (^)())completion;
/*
* After the animation has completed the view's transform will be changed to CGAffineTransformIdentity.
*/
- (void)genieOutTransitionWithDuration:(NSTimeInterval)duration
startRect:(CGRect)startRect
startEdge:(BCRectEdge)startEdge
completion:(void (^)())completion;
@end