As for how to distinguish, you can add a tag when creating the actionSheet; secondly, you can also save the actionSheet and determine if (actionSheet == self.actionSheet1) like this in the delegate function. However, actionSheet may retain the delegate. It is better to use weak references when saving...
The
delegate function has the parameter
actionSheet
itself.can be used to determine which
actionSheet
it is.As for how to distinguish, you can add a tag when creating the actionSheet; secondly, you can also save the actionSheet and determine
if (actionSheet == self.actionSheet1)
like this in the delegate function. However, actionSheet may retain the delegate. It is better to use weak references when saving...You can use Block to write a synchronous ActionSheet, and the code looks intuitive.