To run the example project, clone the repo, and run pod install
from the Example directory first.
JUNFloatControl is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JUNFloatControl'
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
JUNFloatControlConfig *config = [[JUNFloatControlConfig alloc] init]; // Here use default config.
config.content = [self customizeYourContentHere]; // Customize your content here, any UIView.
JUNFloatControl *control = [[JUNFloatControl alloc] initWithConfig:config];
[self.view addSubview:control];
}
@interface JUNFloatControlConfig : NSObject
+ (instancetype)sharedConfig;
@property(nonatomic, assign) CGSize thumbSize;
@property(nonatomic, assign) CGFloat thumbRadius;
@property(nonatomic, strong) UIImage *thumbImage;
@property(nonatomic, strong) UIColor *thumbColor;
@property(nonatomic, assign) CGSize contentSize;
@property(nonatomic, assign) CGFloat contentRadius;
@property(nonatomic, strong) UIColor *contentBorderColor;
@property(nonatomic, assign) CGFloat contentBorderWidth;
@property(nonatomic, strong) UIView *content;
@property(nonatomic, assign) CGPoint initialPositionRatio;
@property(nonatomic, assign) CGFloat animDuration;
@property(nonatomic, strong) UIColor *maskColor;
@end
Jun Ma, maxinchun5@gmail.com
JUNFloatControl is available under the MIT license. See the LICENSE file for more info.