• Stars
    star
    405
  • Rank 106,656 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iOS implementation of Floating Action Button (Google Plus Button, fab), that shows more options

LGPlusButtonsView

iOS implementation of Floating Action Button (Google Plus Button, fab), that shows more options.

Preview

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.

More Repositories

1

LGSideMenuController

iOS view controller which manages left and right side views
Swift
2,045
star
2

LGAlertView

Customizable implementation of UIAlertViewController, UIAlertView and UIActionSheet. All in one. You can customize every detail. Make AlertView of your dream! :)
Objective-C
1,066
star
3

LGRefreshView

iOS pull to refresh for UIScrollView, UITableView and UICollectionView
Objective-C
154
star
4

LGFilterView

View shows and applies different filters in iOS app
Objective-C
121
star
5

LGActionSheet

Customizable implementation of UIActionSheet
Objective-C
121
star
6

LGDrawer

iOS helper draws UIImages programmatically
Objective-C
72
star
7

LGViews

Classes extends abilities of UILabel, UIButton, UITextField and UITextView
Objective-C
55
star
8

LGPlaceholderView

View covers everything inside view controller, and shows some alert text, progress bar or other view, when you need to hide content
Objective-C
55
star
9

LGHelper

iOS helper contains a lot of useful macrosses, methods and hints for every day
Objective-C
29
star
10

LGRadioButtonsView

iOS implementation of radio buttons
Objective-C
26
star
11

LGAudioStreamHelper

iOS helper for easy recording audio stream, getting metadata and type of stream
Objective-C
23
star
12

LGConnection

iOS wrapper around AFNetworking makes it easy to use
Objective-C
14
star
13

LGSharing

iOS helper for easy sharing with email, message or social networks like facebook, twitter, google+ and vkontakte
Objective-C
14
star
14

LGHelper-NS

iOS helper extends NSArray, NSData, NSDate, NSDictionary and other NS* classes
Objective-C
13
star
15

LGViewControllers

Classes extends abilities of UITableViewController, UICollectionViewController, and more
Objective-C
12
star
16

LGHelper-UI

iOS helper extends UIColor, UIImage, UILabel, and other UI* classes
Objective-C
9
star
17

uni_course_cpp

C++
4
star
18

msu_course_cpp_323_2022

C++
3
star
19

Algorithms

Objective-C
3
star
20

Telegram-iOS

Swift
2
star
21

LinuxVM_forMacOS

Swift
2
star
22

online_game

Ruby
1
star