I want to disable buttons in the UIAction sheet and enable them after a certain condition is true. How do I achieve this? Any ideas?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
I found that craig's answer didn't work for me (on OS 3.1). After a little digging around I discovered that the subviews of
UIActionSheet
are actually of an undocumented classUIThreePartButton
Anyway, this works for me (implemented as part of the
UIActionSheetDelegete
method)Hope that helps someone else, although I'd echo Ed Marty's question of whether you'd be better off just omitting these buttons from the action sheet altogether instead of doing this. As always when using undocumented features, there is a risk of app store rejection, although this code is written to fail gracefully if Apple do chnage the APIs again in a future OS release.