Skip to content

Issue in the Demo code #34

Description

@lazar108

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){
                                
                            }
                        }];

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions