我正在尝试从照片卷中当前存在的图像中制作一些合成图像。我的代码似乎可以将照片卷中的图像加载到 UIImageView 上并将其显示给用户;(这是执行此操作的操作:)
- (IBAction)grabImage:(id)sender
{
if ([_myPopoverController isPopoverVisible])
[_myPopoverController dismissPopoverAnimated:YES];
else
{
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeSavedPhotosAlbum])
{
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.mediaTypes = [NSArray arrayWithObjects: (NSString *) kUTTypeImage, nil];
imagePicker.allowsEditing = NO;
_myPopoverController = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
_myPopoverController.delegate = self;
[_myPopoverController presentPopoverFromRect: [sender frame] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES ];
_newMedia = NO;
}
}
}
接下来,我希望能够选择更多照片,但不是替换当前的照片,而是希望它们一层一层地层叠。最后,当用户完成图像分层后,我希望他们能够将最终产品保存到照片卷中。
我该如何实施?不知道从哪里开始...
提前致谢,
码头