This repository has been archived by the owner on Jun 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Should the hack part been moved to the UIImageView+BetterFace.m ? #12
Comments
@f33chobits Thank you for your issue, and sorry for the late reply. Yes there is a specific reason, like developer may not need this feature in some situation. For details:
extension UIImageView {
public override class func initialize() {
struct Static {
static var token: dispatch_once_t = 0
}
dispatch_once(&Static.token) {
// your swizzle code
}
}
I hope my answer could make some sense. |
- (void)setBetterFaceImage:(UIImage *)image{
[self setImage:image]; // instead of swizzling [self setBetterFaceImage:image]
if (![self needsBetterFace]) {
return;
}
[self faceDetect:image];
} I hope this could make sense.
|
Could you please check out #13 , especially the readme file diff? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Like this in UIImageView+BetterFace.m:
+ (void)load
{
hack_uiimageview_bf();
}
I use this code and success to parse the image in the demo.
I think it would be more intuitive and save the work to deal with "main.m".
Or is there a specific reason not to?
The text was updated successfully, but these errors were encountered: