heitorfr / ios-image-editor

iOS View Controller for image cropping. An alternative to the UIImagePickerController editor with extended features.
MIT License
602 stars 129 forks source link

implement in a basicViewController #3

Closed viasisco closed 11 years ago

viasisco commented 11 years ago

I've tried to implement your part of code which launches DemoImageEditor from a basic view controller instead of starting if from the AppDelegate and I have an issue in MY code : "[DemoImageEditor setCropRect:]: unrecognized selector sent to instance" because is not HFImageFrameView which launches setCropRest but the own view. And I don't understand why. Basicaly I have a simple view with a button. I push the button to start UIImagePickerController in a (void) displayImagePickerWithSource where the picker is instantieted with library and *imageEditor which will be pushed to the DemoImageEditor.

heitorfr commented 11 years ago

I don't know if I'm understanding exactly. Do you mean 'setCropSize' ? (not 'setCropRect').

viasisco commented 11 years ago

SetCropSize works fine and is called by HFImageEditorViewController but setCropRect not, because it's not called by HFImageFrameView but by DemoImageEditor. I've just try to adapt the piece of code you've written in the appDelegate, application didFinishLaunchingWithOptions in a (ibaction)buttonPressed function.

viasisco commented 11 years ago

I gonna do a fork with a DemoImageEditor2 for example to launch the viewController with a button.

heitorfr commented 11 years ago

Ok, maybe I can help you if I see some code. Tell me when you've updated your fork.

viasisco commented 11 years ago

I did it in my fork and it works ... fine. So I gonna try to reimplement it in my application. Thanks for your work.

viasisco commented 11 years ago

I've found the reason why I'd an issue : Compiler was on LLVM GCC2 instead of Apple LLVM compiler. Can help others.