LGPlusButtonsView
iOS implementation of Floating Action Button (Google Plus Button, fab), that shows more options
Install / Use
/learn @Friend-LGA/LGPlusButtonsViewREADME
LGPlusButtonsView
iOS implementation of Floating Action Button (Google Plus Button, fab), that shows more options.
Preview
<img src="https://raw.githubusercontent.com/Friend-LGA/ReadmeFiles/master/LGPlusButtonsView/Preview.gif" height="366"/> <img src="https://raw.githubusercontent.com/Friend-LGA/ReadmeFiles/master/LGPlusButtonsView/1.png" height="366"/> <img src="https://raw.githubusercontent.com/Friend-LGA/ReadmeFiles/master/LGPlusButtonsView/2.png" height="366"/> <img src="https://raw.githubusercontent.com/Friend-LGA/ReadmeFiles/master/LGPlusButtonsView/3.png" height="366"/>
Installation
With source code
Download repository, then add LGPlusButtonsView directory to your project.
With CocoaPods
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. To install with cocoaPods, follow the "Get Started" section on CocoaPods.
Podfile
platform :ios, '6.0'
pod 'LGPlusButtonsView', '~> 1.1.0'
With Carthage
Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods. To install with carthage, follow the instruction on Carthage.
Cartfile
github "Friend-LGA/LGPlusButtonsView" ~> 1.1.0
Usage
In the source files where you need to use the library, import the header file:
#import "LGPlusButtonsView.h"
Initialization
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
Handle actions
To handle actions you can use blocks, delegate, or notifications:
Delegate
@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;
Blocks
@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);
Notifications
kLGPlusButtonsViewWillShowNotification;
kLGPlusButtonsViewWillHideNotification;
kLGPlusButtonsViewDidShowNotification;
kLGPlusButtonsViewDidHideNotification;
kLGPlusButtonsViewWillShowButtonsNotification;
kLGPlusButtonsViewWillHideButtonsNotification;
kLGPlusButtonsViewDidShowButtonsNotification;
kLGPlusButtonsViewDidHideButtonsNotification;
kLGPlusButtonsViewActionNotification;
More
For more details try Xcode Demo project and see LGPlusButtonsView.h
License
LGPlusButtonsView is released under the MIT license. See LICENSE for details.
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
