TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2015 |
Maintained by Grigory Lutkov.
iOS implementation of Floating Action Button (Google Plus Button, fab), that shows more options.
Download repository, then add LGPlusButtonsView directory to your project.
platform :ios, '6.0'
pod 'LGPlusButtonsView', '~> 1.1.0'
github "Friend-LGA/LGPlusButtonsView" ~> 1.1.0
In the source files where you need to use the library, import the header file:
#import "LGPlusButtonsView.h"
You have several methods for initialization:
- (instancetype)initWithNumberOfButtons:(NSUInteger)numberOfButtons
firstButtonIsPlusButton:(BOOL)firstButtonIsPlusButton
showAfterInit:(BOOL)showAfterInit;
More init methods you can find in LGPlusButtonsView.h
To handle actions you can use blocks, delegate, or notifications:
@property (assign, nonatomic) id<LGPlusButtonsViewDelegate> delegate;
- (void)plusButtonsViewWillShow:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsViewWillHide:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsViewDidShow:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsViewDidHide:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsViewWillShowButtons:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsViewWillHideButtons:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsViewDidShowButtons:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsViewDidHideButtons:(LGPlusButtonsView *)plusButtonsView;
- (void)plusButtonsView:(LGPlusButtonsView *)plusButtonsView buttonPressedWithTitle:(NSString *)title description:(NSString *)description index:(NSUInteger)index;
@property (strong, nonatomic) void (^willShowHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^willHideHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^didShowHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^didHideHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^willShowButtonsHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^willHideButtonsHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^didShowButtonsHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^didHideButtonsHandler)(LGPlusButtonsView *plusButtonView);
@property (strong, nonatomic) void (^actionHandler)(LGPlusButtonsView *plusButtonView, NSString *title, NSString *description, NSUInteger index);
kLGPlusButtonsViewWillShowNotification;
kLGPlusButtonsViewWillHideNotification;
kLGPlusButtonsViewDidShowNotification;
kLGPlusButtonsViewDidHideNotification;
kLGPlusButtonsViewWillShowButtonsNotification;
kLGPlusButtonsViewWillHideButtonsNotification;
kLGPlusButtonsViewDidShowButtonsNotification;
kLGPlusButtonsViewDidHideButtonsNotification;
kLGPlusButtonsViewActionNotification;
For more details try Xcode Demo project and see LGPlusButtonsView.h
LGPlusButtonsView is released under the MIT license. See LICENSE for details.