I write next. All code wrote with ARC
@interface MPEvent : UIImageView
@property (nonatomic, unsafe_unretained) SEL action;
@property (nonatomic, strong) id target;
@end
Is selector declared in correct way?
In implementation I use my properties next this way:
- (void)sendActionToTargetFromView:(id)view {
[target performSelector:action withObject:view];
}
But compiler show me a warning
warning: Semantic Issue: PerformSelector may cause a leak because its selector is unknown
How to fix this warning?
In the below example -Warc-performSelector-leaks is ignored for only a single line of code, after which the diagnostics return to whatever state had previously existed.
pragma warnings help
Detailed description