I'm currently finishing a project. But there is one last thing I need and can't figure out how to do.
I'm looking for a way to save images to the default folder (camera roll folder). I was thinking of making a button. So if the user decides to save his image he can tap on the save button.
If it matters, I have 4 imageview on top of each other. Would it be possible to save all those view to one image?
Thank you,
Here is how to save an image to the camera roll:
-(IBAction)savePhoto{
UIImageWriteToSavedPhotosAlbum(myImageView.image ,nil, nil, nil);
}
Related
I want to save image in Custom Album from my App. i know it possible in iOS 5 and up.
i am done with this functionality with the reference link
From the reference link image save successfully in Custom Album but issue is that image Save in Custom Album as well as Camera roll . How can i ignore to save in Two folder ?
any one have idea about that ? Thanks in Advance !!!
I m new in iphone.I need to know that how to get image from library without using UIImagePicker controller in iphone.
i m picking image from library through UIImagePicker and store image name in Database but i want to fetch that images back from library with name without UIImagePicker controller.
can anyone tell me how to do so?
The best way is uiimagePickercontroller. Or else You can save it in your database n retrieve it n display it on UIActionSheet as it will give look of imagepicker without using it.
First of all , using UIImagePicker controller is the best way to do this but imposes UI restrictions.
You can use ALAssetsLibrary to pick up images and show it in your own UI.
Third and the most dirty technique would be to pick the image from imagepickercontroller and save it in your documentsDir to pick from there in future(I would not recommend this technique but this is a way to do it without imagepickercontroller).
You can try NSFileManager to access files of the camera directory /User/Media/DCIM/. And then open the files and loading them into UIImageViews. Not sure on how Apple would react on this as you're accessing files outside your apps sandbox.
In my app, the user picks an image with UIImagePickerController. They can then view a gallery of the pictures they've selected. If they pick screenshots taken with the iphone, the images display correctly, but if they pick images taken with the camera (or take a new photo with the camera), after a short while an image will appear black, followed by every other image appearing black. I've tried for days to get rid of this behaviour without any success. The code is pretty straight forward:
if ([[info objectForKey:UIImagePickerControllerMediaType] isEqualToString:#"public.image"]) {
[mediaSource addImage:[info objectForKey:UIImagePickerControllerOriginalImage]];
}
mediaSource adds the image to an NSDictionary, and then the gallery puts this image into a uiimageview when it's needed, although for testing purposes i've tried simply displaying the image straight off, which gives the same result. The key variable here seems to be that it only happens with images from the camera, so perhaps the solution is to somehow remake these images before displaying them again.
Any ideas?
Its not [info objectForKey:UIImagePickerControllerOriginalImage].
Change this to [info valueForKey:UIImagePickerControllerOriginalImage] and try it.
And BTW, what is thumbnail?
I want to create a application in which i required following function
create array of images in view and move like page turning effect orientation change then same view will execute. tap on image then zoom in or zoom out image.
double tap then upload bigger image from web-services.
on image when select part of image then open url of that image.
Try these Sample code
https://github.com/devindoty/iBooks-Flip-Animation
http://oleb.net/blog/2010/06/app-store-safe-page-curl-animations/
https://github.com/mtabini/AFKPageFlipper
AFKPageFlipper will help you with the page-flip-effect. The other questions: First, try to solve it self (zoom, ...) and if you have problem ask a new questions here.
I was wondering how I can manipulate the launch image of an iPhone app? I have put launchImage.png into my plist file (under Launch image (iPhone)) and when the app starts I would like to animate this launch image out of the view, like so:
launchImage.transform = CGAffineTransformMakeTranslation(-CGRectGetWidth(launchImage.frame), 0);
But how do I access an image which I've defined in my plist?
Or will I simply load another instance of the image and then animate it out of the way? This appears a little cumbersome, especially as the app has already loaded the launch image.
Any suggestions would be very much appreciated! Thanks in advance!
You'll have to load another instance. You can't access the launch image from your app. I usually just make a UIImage that matches the launch image and in my viewDidAppear method I animate it away with a performSelector:withDelay: of a second or 2.
Your best bet is to create a UIImageView instance set to display your launch image, put it on the root view controller's view, then animate it out of the way as you've described (perhaps in -viewDidAppear:). As far as I know, there's no API mechanism for interacting with the launch image directly.
You have to load up the launch image again and then animate it out.