https://github.com/wilddylan/uiviewhelper
UIViewHelper
https://github.com/wilddylan/uiviewhelper
ui-components
Last synced: about 1 year ago
JSON representation
UIViewHelper
- Host: GitHub
- URL: https://github.com/wilddylan/uiviewhelper
- Owner: wilddylan
- License: mit
- Created: 2015-12-24T03:03:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-24T05:58:11.000Z (over 10 years ago)
- Last Synced: 2025-05-13T01:16:34.528Z (about 1 year ago)
- Topics: ui-components
- Language: Objective-C
- Size: 46.9 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UIViewHelper
[](https://travis-ci.org/Dylan/UIViewHelper)
[](http://cocoapods.org/pods/UIViewHelper)
[](http://cocoapods.org/pods/UIViewHelper)
[](http://cocoapods.org/pods/UIViewHelper)
## Usage
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Methods
- properties
```objc
@property (nonatomic, assign) CGPoint origin;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGFloat top;
@property (nonatomic, assign) CGFloat left;
@property (nonatomic, assign) CGFloat bottom;
@property (nonatomic, assign) CGFloat right;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGSize boundsSize;
@property (nonatomic, assign) CGFloat boundsWidth;
@property (nonatomic, assign) CGFloat boundsHeight;
@property (nonatomic, readonly) CGRect contentBounds;
@property (nonatomic, readonly) CGPoint contentCenter;
@property (nonatomic, strong) UILabel *badge;
@property (nonatomic, strong) UIColor *badgeBgColor;
@property (nonatomic, strong) UIColor *badgeTextColor;
@property (nonatomic, assign) CGRect badgeFrame;
@property (nonatomic, assign) DLBadgeAnimType aniType;
```
- methods
```objc
// shake View
- (void)shakeView;
// show bage
- (void)showDLBadge;
- (void)showDLBadgeWithStyle:(DLBadgeStyle)style value:(NSInteger)value animationType:(DLBadgeAnimType)aniType;
- (void)clearBadge;
// Moves
- (void)moveTo:(CGPoint)destination duration:(float)secs option:(UIViewAnimationOptions)option;
- (void)moveTo:(CGPoint)destination duration:(float)secs option:(UIViewAnimationOptions)option delegate:(id)delegate callback:(SEL)method;
- (void)raceTo:(CGPoint)destination withSnapBack:(BOOL)withSnapBack;
- (void)raceTo:(CGPoint)destination withSnapBack:(BOOL)withSnapBack delegate:(id)delegate callback:(SEL)method;
// Transforms
- (void)rotate:(int)degrees secs:(float)secs delegate:(id)delegate callback:(SEL)method;
- (void)scale:(float)secs x:(float)scaleX y:(float)scaleY delegate:(id)delegate callback:(SEL)method;
- (void)spinClockwise:(float)secs;
- (void)spinCounterClockwise:(float)secs;
// Transitions
- (void)curlDown:(float)secs;
- (void)curlUpAndAway:(float)secs;
- (void)drainAway:(float)secs;
// Effects
- (void)changeAlpha:(float)newAlpha secs:(float)secs;
- (void)pulse:(float)secs continuously:(BOOL)continuously;
// add subview with animation
- (void)addSubviewWithFadeAnimation:(UIView *)subview;
// gesture with block
- (void)addTapActionWithBlock:(GestureActionBlock)block;
- (void)addLongPressActionWithBlock:(GestureActionBlock)block;
// firstResponderViewController
- (UIViewController *)firstResponderViewController;
```
## Requirements
## Installation
UIViewHelper is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "UIViewHelper"
```
## Author
Dylan, 3664132@163.com
## License
UIViewHelper is available under the MIT license. See the LICENSE file for more info.