maxkonovalov / MKDropdownMenu

🔻 Dropdown Menu for iOS with many customizable parameters to suit any needs
MIT License
524 stars 83 forks source link

Add isComponentOpened method #7

Closed j796160836 closed 7 years ago

j796160836 commented 8 years ago

Hi, I would like to programming open menu by myself, like this.

Usage:

- (IBAction)buttonClick:(id)sender {
    if (![self.navBarMenu isComponentOpened]) {
        [self.navBarMenu openComponent:0 animated:YES];
    } else {
        [self.navBarMenu closeAllComponentsAnimated:YES];
    }
}

but I cannot have the status to determine it when open or close. so I add a method, please take a look, thanks.

j796160836 commented 8 years ago

I notice that travis-ci build failed. I just ignored that error?

maxkonovalov commented 8 years ago

Hi @j796160836 I think rather than adding the -isComponentOpened method we should just expose the selectedComponent property, which would cover more use-cases. For the CI, I think travis has some issues with Xcode 8 builds, I'll need to figure out. Also looks like you have pushed your own project changes to this pull request, you'll have to discard them on this branch to make it work.

maxkonovalov commented 7 years ago

Added the selectedComponent property in v1.3.1

j796160836 commented 7 years ago

Hi Max, I haven't noticed that pull request branch and own use branch are same. I should make a independent branch for you, Sorry.

Yeah, I forked do the small modify for your great module. My use-case is using this dropdown drawer and putting my custom view there. That is why having following commit there. I stripped out the TableView and simplify the code there because I just use one cell for that. Anyway, it works great, Thanks.