ryanmaxwell/UIActionSheet-Blocks

Convenience calls should return UIActionSheet instance

manide opened this issue · 4 comments

I like this category, thank you very much for this. Here's a proposal to improve it even more: The convenient "show..." calls should return the internally created UIActionSheet instance. This can be helpful, e.g. to remember if there's already an action sheet active and cancel it before opening a different one. Thank you!

Thanks. I agree it may have its uses to return the instance. My only hesitation is that none of the Cocoa APIs use this pattern. I don't see how it could hurt, perhaps the analyzer may throw a warning about an unassigned/unused return value (if not now, in the future)?

I think it will be OK. There will be no warning. There are many other class methods that return something, but the return value has not to be used. E.g. scheduledTimerWithTimeInterval etc.

I've added this functionality in release 0.8. Cheers!

Perfect! Thank you!