-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Hey, I really like your project!
I experienced a bug when trying to add the demo code to my project here (the commented part):
LGPlusButtonsView *buttonTwo;
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
buttonTwo = [LGPlusButtonsView plusButtonsViewWithNumberOfButtons:4
firstButtonIsPlusButton:YES
showAfterInit:YES
actionHandler:^(LGPlusButtonsView *plusButtonView, NSString *title, NSString *description, NSUInteger index)
{
NSLog(@"actionHandler | title: %@, description: %@, index: %lu", title, description, (long unsigned)index);
//if (index == 0)
//[buttonTwo hideAnimated:YES completionHandler:nil];
}];
If i uncomment the code then the plus button shows up on the bottom right but disappears once you click it.
Change the code to something like this, to add less confusion:
LGPlusButtonsView *buttonTwo;
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
buttonTwo = [LGPlusButtonsView plusButtonsViewWithNumberOfButtons:4
firstButtonIsPlusButton:YES
showAfterInit:YES
actionHandler:^(LGPlusButtonsView *plusButtonView, NSString *title, NSString *description, NSUInteger index)
{
//This will log the button click for the Floating Button
//NSLog(@"actionHandler | title: %@, description: %@, index: %lu", title, description, (long unsigned)index);
if (index == 0){
//[buttonTwo hideAnimated:YES completionHandler:nil];
}else if (index == 1){
}else if (index == 2){
}else if (index == 3){
}else if (index == 4){
}else if (index == 5){
}else if (index == 6){
}
}];
Metadata
Metadata
Assignees
Labels
No labels