Is it possible to create a delegate in a Category?
Let's say, i have a Category UIImageView (ImagePicker)
, in which i've create some methods and all work perfectly.
However, i need to add a delegate into this category, UIImageViewDelegate
let's say. Because at some point in the UIImageView (ImagePicker)
implementation, i need it to trigger a event, and i want the user to catch this event.
Since i'm creating a category, and properties are not allowed in the category. So it seems that there is no way for me to add such a delegate, because based on my knowledge, to have create a delegate, you always have to create a property in the interface like this:
@property (weak, nonatomic) id <UIImageViewDelegate> delegate;
Does anyone have any idea on this?
EDIT:
The logic of this Category,
The function of this category is to enable the user to set the UIImage of the UIImageView, by choose a photo from the Photo.app. The category handles all the process including the UI interactions. Now i need a delegate to call back to user when the image is set.