We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info { [self dismissViewControllerAnimated:YES completion:nil];
for (UIView *v in [_scrollView subviews]) { [v removeFromSuperview]; }
CGRect workingFrame = _scrollView.frame; workingFrame.origin.x = 0;
NSMutableArray *images = [NSMutableArray arrayWithCapacity:[info count]]; for (NSDictionary dict in info) { if ([dict objectForKey:UIImagePickerControllerMediaType] == ALAssetTypePhoto){ if ([dict objectForKey:UIImagePickerControllerOriginalImage]){ UIImage image=[dict objectForKey:UIImagePickerControllerOriginalImage]; [images addObject:image];
UIImageView *imageview = [[UIImageView alloc] initWithImage:image]; [imageview setContentMode:UIViewContentModeScaleAspectFit]; imageview.frame = workingFrame; [_scrollView addSubview:imageview]; workingFrame.origin.x = workingFrame.origin.x + workingFrame.size.width; } else { NSLog(@"UIImagePickerControllerReferenceURL = %@", dict); } } else if ([dict objectForKey:UIImagePickerControllerMediaType] == ALAssetTypeVideo){ if ([dict objectForKey:UIImagePickerControllerOriginalImage]){ UIImage* image=[dict objectForKey:UIImagePickerControllerOriginalImage]; [images addObject:image]; UIImageView *imageview = [[UIImageView alloc] initWithImage:image]; [imageview setContentMode:UIViewContentModeScaleAspectFit]; imageview.frame = workingFrame; [_scrollView addSubview:imageview]; workingFrame.origin.x = workingFrame.origin.x + workingFrame.size.width; } else { NSLog(@"UIImagePickerControllerReferenceURL = %@", dict); } } else { NSLog(@"Uknown asset type"); }
}
self.chosenImages = images;
[_scrollView setPagingEnabled:YES]; [_scrollView setContentSize:CGSizeMake(workingFrame.origin.x, workingFrame.size.height)]; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
(void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info
{
[self dismissViewControllerAnimated:YES completion:nil];
for (UIView *v in [_scrollView subviews]) {
[v removeFromSuperview];
}
CGRect workingFrame = _scrollView.frame;
workingFrame.origin.x = 0;
NSMutableArray *images = [NSMutableArray arrayWithCapacity:[info count]];
for (NSDictionary dict in info) {
if ([dict objectForKey:UIImagePickerControllerMediaType] == ALAssetTypePhoto){
if ([dict objectForKey:UIImagePickerControllerOriginalImage]){
UIImage image=[dict objectForKey:UIImagePickerControllerOriginalImage];
[images addObject:image];
}
self.chosenImages = images;
[_scrollView setPagingEnabled:YES];
[_scrollView setContentSize:CGSizeMake(workingFrame.origin.x, workingFrame.size.height)];
}
The text was updated successfully, but these errors were encountered: