gbs

GBSlideOutToUnlockView

[DEPRECATED] An "Inside-2-Outside Slide to Unlock" component for iOS

Showing:

Popularity

Downloads/wk

0

GitHub Stars

50

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

0

License

MIT

Categories

Readme

[DEPRECATED] GBSlideOutToUnlockView

Version Platform

Installation

GBSlideOutToUnlockView is available through CocoaPods, to install it simply add the following line to your Podfile:

pod "GBSlideOutToUnlockView"

But if you don't use CocoaPods, you can just copy the Classes folder into your project and add the PNG files inside the Assets folder into you projects.

Screenshots

Component example

Note: The "Unlocked/did not unlock" label is presented only in the Example project. It is not contained inside the component.

Usage

To create a slide to unlock component programmatically, just instantiate a new GBSlideOutToUnlockView with a frame and add it to some view, for example:

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    GBSlideOutToUnlockView *slideToUnlockView = [[GBSlideOutToUnlockView alloc] initWithFrame:containerView.bounds];
    slideToUnlockView.delegate = self;
    [containerView addSubview:slideToUnlockView];
}

And then, implement its protocol to handle its events:

@protocol GBSlideOutToUnlockViewDelegate <NSObject>
@optional
- (void)slideOutToUnlockViewDidStartToDrag:(GBSlideOutToUnlockView *)slideOutToUnlockView;
- (void)slideOutToUnlockViewDidEndToDrag:(GBSlideOutToUnlockView *)slideOutToUnlockView;
- (void)slideOutToUnlockViewDidUnlock:(GBSlideOutToUnlockView *)slideOutToUnlockView;
- (void)slideOutToUnlockViewDidNotUnlock:(GBSlideOutToUnlockView *)slideOutToUnlockView;
- (void)slideOutToUnlockView:(GBSlideOutToUnlockView *)slideOutView didDragDistance:(CGFloat)distance;
@end

You can easily customize your instance of GBSlideOutToUnlockView using the properties below


@property (nonatomic, assign) CGFloat innerCircleRadius;
@property (nonatomic, assign) CGFloat outerCircleRadius;

@property (nonatomic, strong) UIColor *innerCircleColor;
@property (nonatomic, strong) UIColor *outerCircleColor;

@property (nonatomic, strong) UIColor *draggableButtonBackgroundColor;
@property (nonatomic, strong) UIColor *draggableImageTintColor;

@property (nonatomic, strong) UIImage *draggableImage;

Author

Gustavo Barbosa @gustavocsb

License

Copyright (c) 2015 Gustavo Barbosa

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100