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

Unlimited buttons #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nestorlafon
Copy link

I needed more than 10 buttons for a selection list and I saw the macro expanding the list of buttons was not the perfect solution.

I remove the macros and created a method with similar signature to the UIActionSheet init method but taking the array instead of the list of arguments. Using UIActionSheet methods I configure the list of buttons as it would look if added with the default init method.

I changed all code to use the new method when needed.

Nestor Lafon-Gracia and others added 2 commits March 10, 2014 14:51
@emartynov
Copy link

Just trapped in the same situation. Any estimation when this will be merged and released to cocoapods?

@ryanmaxwell
Copy link
Owner

Hey guys - this looks like a great solution on the outside - but I need to do some more tests before merging it. I've had issues in the past where the indexes of buttons got messed up/inconsistent on iphone v. ipad when using the addButtonWithTitle: method on various versions of iOS. There are some issues internally to UIActionSheet and I didn't want to just add this and then have people's code taking incorrect paths in response to an alert action.

If you could take the time to write some tests to verify that the action and cancel button indexes are reported correctly, and test on iOS4.3+ (which this podspec supports) and iPad/iPhone that would be much appreciated and speed the merge of this PR.

If we find inconsistencies on older versions of iOS, I'm thinking about bumping the minimum target to 5 or 6+ and also make it ARC-only.

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.

3 participants