UIActionSheet is not showing separator on the last item on iOS 7 GM

后端 未结 8 486
暗喜
暗喜 2020-12-03 04:31

It could be probably a bug on iOS7. But the last button is not separated from the previous one\"UIActionSheet

8条回答
  •  无人及你
    2020-12-03 05:07

    I found a way to make it work on iPhone and iPad in the least hacky way:

    1. Only init the UIActionSheet with a title
    2. Add your buttons
    3. Add a "CANCEL" button at last
    4. set the CancelButtonIndex to that last index

    I assume that the missing separator is caused by the cancel button not being recognized as a separate case when adding it first or through the init.

提交回复
热议问题