Reputation: 1839
I am trying to implement the ELCImagePickerController, but when I try to present the picker, just a black screen shows up with a navigation bar at the top. I moved all files(also the xib) into my project :/ Is this a problem because of swift/ios8 ?
var imagePicker:ELCImagePickerController = ELCImagePickerController();
self.presentModalViewController(imagePicker, animated: true);
Upvotes: 1
Views: 856
Reputation: 17461
That's because you are just calling the init
method instead of the proper initImagePicker
that is expected to be used (See the source here).
If you instantiate in like this it works:
var picker = ELCImagePickerController(imagePicker: ())
Note that the name is weird because of the automatic conversion that Xcode does for you of the Objective-C method by removing the init
part of the name.
Also note that you don't need to specify that picker
is of type ELCImagePickerController
because Swift infers it automatically.
Hope this helps :)
Upvotes: 2