From 3d40519794c16f63e722fb7837740657f8c6df99 Mon Sep 17 00:00:00 2001 From: Thanh Pham Date: Thu, 26 May 2016 12:19:18 +0800 Subject: [PATCH] Fix error when adding to swift project Error message: getter for 'image' with Objective-C selector 'image' conflicts with method 'image()' from superclass 'UIView' with the same Objective-C selector --- UIImage+PDF/UIView+Image.h | 3 ++- UIImage+PDF/UIView+Image.m | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/UIImage+PDF/UIView+Image.h b/UIImage+PDF/UIView+Image.h index be1f194..2f6b71b 100644 --- a/UIImage+PDF/UIView+Image.h +++ b/UIImage+PDF/UIView+Image.h @@ -10,7 +10,8 @@ @interface UIView( Image ) --(UIImage *) image; +@property (nonatomic) UIImage *image; + -(void) savePNG:(NSString *)filePath; -(void) saveJPEG:(NSString *)filePath :(float)quality; diff --git a/UIImage+PDF/UIView+Image.m b/UIImage+PDF/UIView+Image.m index c1a9e60..856f079 100644 --- a/UIImage+PDF/UIView+Image.m +++ b/UIImage+PDF/UIView+Image.m @@ -28,7 +28,7 @@ -(UIImage *)image return image; } - +- (void)setImage:(UIImage *)image {} -(void) savePNG:(NSString *)filePath {