myang-git / iOS-Image-Crop-View

A view that allows user to select the cropping area in an image
383 stars 78 forks source link

Swift Implementation #15

Closed pcs289 closed 9 years ago

pcs289 commented 9 years ago

When instantiating the ImageCropViewController(image: myUIImage) it detects the initializer as the Delegate method ImageCropViewController(controller: UIViewController!, didFinishCroppingImage croppedImage: UIImage!) so it expects the initializer to provide the croppedImage argument

frapsMatheus commented 9 years ago

Hey, so I fixed this problem by changing the ImageCropViewControllerDelegate on the header to:

pragma mark ImageCropViewControllerDelegate interface

@protocol ImageCropViewControllerDelegate

@end

frapsMatheus commented 9 years ago

And on the .m:

} @end

pcs289 commented 9 years ago

Thank you @matrpedreira, I would add @protocol ImageCropViewControllerDelegate <NSObject> in the .h so that respondsToSelector: actually works

frapsMatheus commented 9 years ago

Probably better, the problem is that I don't have experience with Objective-C so just tried some stuff until it worked.

ppsdang commented 8 years ago

Hi Currently I am facing the same issue.

myang-git commented 8 years ago

Do you have an example that can reproduce this issue so I can take a look?

On Wed, Oct 7, 2015 at 6:36 AM, ppsdang notifications@github.com wrote:

Hi Currently I am facing the same issue.

— Reply to this email directly or view it on GitHub https://github.com/myang-git/iOS-Image-Crop-View/issues/15#issuecomment-146149223 .