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

Bug: addButtonWithTitle fails when 0 buttons passed in initWithTitle #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simonholroyd
Copy link

If you use addButtonWithTitle to add additional buttons rather than pass them all through initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles then the indexing of the buttons is incorrect. Maybe addButtonWithTitle wasn't designed to be a public method used this way, but I've found it's helpful sometimes to iteratively add buttons.

eg.

TTAlertView *alert = [[TTAlertView alloc] initWithTitle:@"test" message:@"testing alert" delegate:nil cancelButtonTitle:@"cancel" otherButtonTitles:nil];

...

[alert addButtonWithTitle:@"button that should show"];
[alert show];

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

Successfully merging this pull request may close these issues.

1 participant