I am new in iOS. I want to know if it is possible to access the retake image button of UIImagePickerController. If so, how do you call a function on that button?
My problem is that I am using UIImagePickerController to take an image from the camera and save the image in the documents directory. I have done my task using a UIImageView and UIAlertView on an other view, but the problem is that I want to save the image before retake image button pressed in camera. What I have to do to achieve this?
You can't do what you want using UIImagePickerController. Instead, use AVFoundation framework for capturing still images in the way you want. Please, check this Apple's sample project http://developer.apple.com/library/ios/#samplecode/AVCam/Introduction/Intro.html.
Related
I have a GUI Builder created form in codename one, how can i open the camera in a resizable view at the show() of the form and place container like text area or anything else on it?
I saw the camera demo but i don't understand it very well because on the simulator it open a file picker.
My purpose is to create a form with a camera resizable capture when you have two labels and you can also write or paint on your photo used in background, I do this only for hobby and fun, i do what i can, Any advice is well accepted, thank you for the attenction
You can now place a component on top of a camera view with a new cn1lib: https://github.com/codenameone/CameraKitCodenameOne
Original answer below:
I'm assuming you mean overlay on a live camera view. While this is possible it's not supported at this time in the Java API layer.
If you mean grabbing a photo and setting it as a background for the form for overlay you can create an image with the result of the Capture API and use setBgImage() to set that image to the background of a component or form.
We need to open the iPhone camera, to take images that will be saved to the camera roll.
I have read many examples here that all of them opens the UIImagePickerView.
Besides the fact that i cant understand why i have to open the picker view in order to open the camera , i just can't do that- i dont want the picker view, because i have my costumed photo album that we build, and we just need to have a little button in it, that opens the camera to take an image . without opening any other views above it .
Is that possible to use the camera without this pickerview that will cover my scene ?
or can i lead the user to the camera app and than take him back to my app ?
Thanks.
Instead of high level (i.e. Apple supplies the UI element) classes, you have to go to a more foundational (lower) level of API's, which would be AVCaptureDevice and AVCaptureDeviceInput.
And Apple has some nice source code available in their AVCam project.
If you want to display camera stream in you app without UIImagePickerController than you should you AVFoundation framework.
Here some some examples and tutorials:
take-photos-with AVFoundation
Custom camera
Displaying camera
I want to be able to place images in an iPad app from a given directory and then let the user resize the image and move it around on the screen.
My question is: what's the best view to use that would allow user to resize the image (with gesture recognition) and move it around on the screen?
Thanks in advance
Quartz 2D
http://developer.apple.com/library/ios/#documentation/graphicsimaging/conceptual/drawingwithquartz2d/dq_overview/dq_overview.html#//apple_ref/doc/uid/TP30001066-CH202-TPXREF101
Can draw anything you want.
Control with gestures
You're looking for UIScrollView with the viewForZoomingInScrollView: delegate method implemented.
Since you want to display an image, add a UIImageView to the scrollview and return it in the delegate.
I am able to cature image (using AVFoundation), save image using assets library and save its asset url, open the camera roll programmatically using image picker.
What I want to do is, when I click on the a particular button, the last saved image of the camera roll should show up as if I had opened the camera roll and clicked on that image. I don't want to return the image object back to the program, i just want have a look at the image. And if I swipe on the screen, the camera roll images should scroll.
Also, can I do this using the saved asset url instead of just accessing the last saved image?
Also, If I press cancel there, i might want to return to the camera roll instead of my view controller. Would that be possible?
(I tried to search but i don't think i have the right keywords)
similar question here : Open camera roll on an exact photo
But no answer.
I am creating a bit of a video mash up app (like imovie) and the first function I am tackling is the ability to drag a thumbnail from a video library and drop it on a time line. I was able to add the drag code to the video thumbnail class so when you touch it, it creates a drag proxy view which moves around when you move your finger. Next I want to be able to drop it on the time line.
My Timeline is also a uiview and I am unsure of how it can receive notification that the thumbnail is being dragged over it! It will need the position of the thumbnail so that it can show it on the timeline and the duration of the clip and such (information that I have attached to my video thumbnail object)
How would you approach this issue? The App is for ipad and is on ios 5.
Thanks for any pointers!
You will most likely want to subclass the UIView. You can look at this post:
https://stackoverflow.com/a/4130641/1535038
Mainly you will want to see if the My Timeline view is being touched, and then see if you are in the middle of a drag or not.