Welcome, Guest
Username Password: Remember me

SCImagePickerCell - save to photos
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: SCImagePickerCell - save to photos

SCImagePickerCell - save to photos 1 year, 5 months ago #1

Would it be possible to get a property for SCImagePickerCell that tells STV to save the image to your Photos as well as in the Documents directory?
  • icyplains
  • OFFLINE
  • Expert Boarder
  • Posts: 133
  • Karma: 5

Re: SCImagePickerCell - save to photos 1 year, 5 months ago #2

How about a delegate method that gives you access to the UIImage as soon as it has been selected? This way you can do whatever you want with the image.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: SCImagePickerCell - save to photos 1 year, 5 months ago #3

Perfect!
  • icyplains
  • OFFLINE
  • Expert Boarder
  • Posts: 133
  • Karma: 5

Re: SCImagePickerCell - save to photos 1 year, 5 months ago #4

After giving some more thought to this, it turns out the delegate method already exists! Here is a code sample that uses valueChangeForRowAtIndexPath to get the selected image:

 
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
valueChangedForRowAtIndexPath:(NSIndexPath *)indexPath
{
SCTableViewCell *cell = [tableViewModel cellAtIndexPath:indexPath];
if([cell isKindOfClass:[SCImagePickerCell class]])
{
UIImage *selectedImage = ((SCImagePickerCell *)cell).selectedImage;
 
if(selectedImage)
{
// do your stuff here
}
}
}
 


Hope this helps!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: SCImagePickerCell - save to photos 1 year, 5 months ago #5

Got it, thanks!
  • icyplains
  • OFFLINE
  • Expert Boarder
  • Posts: 133
  • Karma: 5
  • Page:
  • 1
Time to create page: 0.85 seconds