Skip to content

A float menu control that attaches to the edge of the window.

License

Notifications You must be signed in to change notification settings

Jun2786184671/JUNFloatControl

Repository files navigation

JUNFloatControl

Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

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

pod 'JUNFloatControl'

Example

Usage

- (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];
}

Configuration

@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

Author

Jun Ma, maxinchun5@gmail.com

License

JUNFloatControl is available under the MIT license. See the LICENSE file for more info.

About

A float menu control that attaches to the edge of the window.

Resources

License

Stars

Watchers

Forks

Packages

No packages published