Skip to content

iOS implementation of Google 'plus button', that shows more options

License

Notifications You must be signed in to change notification settings

mohsinalimat/LGPlusButtonsView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LGPlusButtonsView

iOS implementation of Google 'plus button', 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. See the "Get Started" section for more details.

Podfile

platform :ios, '6.0'
pod 'LGPlusButtonsView', '~> 1.0.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)initWithView:(UIView *)view
             numberOfButtons:(NSUInteger)numberOfButtons
             showsPlusButton:(BOOL)showsPlusButton;

More init methods you can find in LGPlusButtonsView.h

Handle actions

To handle actions you can use initialization methods with blocks or delegate, or implement it after initialization.

Delegate

@property (assign, nonatomic) id<LGPlusButtonsViewDelegate> delegate;

- (void)plusButtonsView:(LGPlusButtonsView *)plusButtonsView buttonPressedWithTitle:(NSString *)title description:(NSString *)description index:(NSUInteger)index;
- (void)plusButtonsViewPlusButtonPressed:(LGPlusButtonsView *)plusButtonsView;

Blocks

@property (strong, nonatomic) void (^actionHandler)(LGPlusButtonsView *plusButtonView, NSString *title, NSString *description, NSUInteger index);
@property (strong, nonatomic) void (^plusButtonActionHandler)(LGPlusButtonsView *plusButtonView);

More

For more details try Xcode Demo project and see LGPlusButtonsView.h

License

LGPlusButtonsView is released under the MIT license. See LICENSE for details.

About

iOS implementation of Google 'plus button', that shows more options

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 99.0%
  • Other 1.0%