Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

UI7ActionSheet addButtonWithTitle: issue #118

Open
angeloalduino opened this issue Oct 2, 2013 · 0 comments
Open

UI7ActionSheet addButtonWithTitle: issue #118

angeloalduino opened this issue Oct 2, 2013 · 0 comments
Labels

Comments

@angeloalduino
Copy link

When using a UIActionSheet with the usual initializer of initWithTitle:delegate:cancelButtonTitle:destructiveButtonTitle:otherButtonTitles:, things work as expected. However, if you pass nil for otherButtonTitles and programmatically add them later (but before presenting), it renders incorrectly.

A workaround is to call setCancelButtonIndex (and setDestructiveButtonIndex if necessary) after adding other button titles. These indexes need to be set as your total button count, even though they will actually show up at the top of the list and report an index of 0 or 1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant