Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in the Demo code #34

Open
lazar108 opened this issue Nov 3, 2016 · 0 comments
Open

Issue in the Demo code #34

lazar108 opened this issue Nov 3, 2016 · 0 comments

Comments

@lazar108
Copy link

lazar108 commented Nov 3, 2016

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){
                                
                            }
                        }];
@lazar108 lazar108 changed the title inproved tutorial Issue in the Demo code Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant