FacebookImagePicker-iOS
FacebookImagePicker-iOS copied to clipboard
Functionality ShouldPick
Hey OceanLabs,
great work, really much appreciated this. I am using this in Swift2.1 though.
Can you quickly explain to me how to allow the user to just pick 1 Image each? I'll get an error using the Should function.
found an answer myself: func facebookImagePicker(imagePicker: OLFacebookImagePickerController!, shouldSelectImage image: OLFacebookImage!) -> Bool { if imagePicker.selected == nil { return true; } else if imagePicker.selected.count == 0 { return true; } else { return false; } }
@szlangini, you can also dismiss the picker after selecting the first image.
- (void)facebookImagePicker:(OLFacebookImagePickerController *)imagePicker didSelectImage:(OLFacebookImage *)facebookImage {
[self dismissViewControllerAnimated:YES completion:^{
// process facebookImage
}];
}