2013-03-14 23 views
0

我想從照片卷中的當前存在的合成圖像。 我有代碼似乎工作,從圖片卷加載到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; 
     } 
    } 
} 
未來

我希望能夠選擇更多的照片的行動,但不是替換當前我希望他們能夠在另一個上面疊放。最後,當用戶完成分層圖像時,我希望他們能夠將最終產品保存到照片卷。

我該如何實施?不知道從哪裏開始...

在此先感謝,

碼頭

回答

0

事實證明,所有的一切要做到這一點只需添加CALayers與不同程度的阿爾法的需要的UIImageView;而不是消除以前的圖像,並用新的圖像替換它,我只是添加不同的阿爾法層的圖像。奇蹟般有效!

相關問題