FacebookImagePicker-iOS icon indicating copy to clipboard operation
FacebookImagePicker-iOS copied to clipboard

Functionality ShouldPick

Open szlangini opened this issue 9 years ago • 2 comments

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.

szlangini avatar Dec 14 '15 22:12 szlangini

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 avatar Apr 05 '16 16:04 szlangini

@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
    }];
}

vsiniak avatar Jul 12 '16 13:07 vsiniak