I am just curious as to how current ZOOM-Camera Apps on the AppStore are implemented (Are they using undocumented APIs?)
They're probably just cropping into a section of a photo, and interpolating it bigger. Since there's no hardware zoom in the phone, you have to "fake" it.
Related
We are using Coreplot to draw Charts in our IOS application, however we can't make the charts support zooming or panning. We are still running the application on the emulator didn't install on a real device yet because we are waiting for the Developer ID from Apple. Does any one know if Coreplot support these features?
Thanks in advance
Short answer: yes, Core Plot supports zooming and panning.
You have to set the allowsUserInteraction bool of your plot space to YES.
See this link for more information.
Also, if you want to test zooming in the simulator, you can do this by pressing the alt button and click+drag with your mouse. Panning is just normal click+drag.
I've read the documentation and googled until I couldn't google anymore, but still I cannot figure out how to make my iPhone app use the higher resolution images when displayed in "2x" mode on the iPad.
I have Icon.png Icon#2x.png and Icon-72.png and they work fine, but I don't want to have to rename all of my images. Also, the "2x" just seems to scale up pixels so text and IB objects look terrible. Is there a fix for this? Any suggestions would be greatly appreciated!
Note: This is not a universal app. I don't want to make it into a universal app. I just want it to scale up and look pretty on the ipad.
It is possible, at least in Cocos2D apps. Matt Rix does exactly this in his app Trainyard and it looks great on the iPad at 2x! He covers some of the details on his blog: Retinafy your Game.
Apple want you to write native iPad apps, so they deliberately don't support this, and there's no way to make it happen that I'm aware of.
You can register for the notification _UIClassicApplicationWillChangeZoomNotificationName and scale your graphics appropriately, i.e. by setting the rasterizationScale on the CALayer to the value returned by [[UIScreen mainScreen] scale].
I'm currently developing an app that has a camera functionality, with a custom camera screen, featuring a preview screen and an overlay.
I'm using the AVFoundation classes and methods as per the eradication of UIScreenCapture.
The problem I have is that the preview data I get from AVCaptureSession is too zoomed in. If i take a picture with that screen, and another with the iPhone's default camera app, without moving the iPhone, the difference in zoom is far too much.
I need the zoom of my app to be the same as is default for iPhone camera app.
I've tried changing the AVCaptureVideoPreviewLayer.videoGravity, to any of it's 3 possible values, to no avail.
Please, any leads on this problem are truly appreciated.
Arcantos' solution was mostly correct. That will work assuming you're on an iPhone 3G (or any device with a camera that supports 640x480). An iPhone 4 may run into some issues there.
A more correct way would be to test for the availability of and apply this preset:
captureSession.sessionPreset = AVCaptureSessionPresetPhoto;
This will use the raw camera data, regardless of the native resolution.
Turned out to be a resolution issue.
It was fixed by using
myCaptureSession.sessionPreset = AVCaptureSessionPreset640x480
Note that iPhone 3g does not support that, so you have to ask wheter the device supports it
[[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo] supportsAvCaptureSessionPreset:AVCaptureSessionPreset640x480]
Is the aspect ratio of your preview pane identical to that of the camera capture data? If not, the OS may be changing the zoom to fit the data rect into your requested aspect ratio.
I have two of my apps rejected by Apple and sitting on the "shelves of approval" for 2 months, because both apps were using UIImagePickerController and I dared to add a rectangle on top of the UIImagePickerController, using something as
[picker.view addSubView:rectangle];
On the other hand, applications like CameraZoom and others, ditch the UIImagePickerController regular appearance completely and has its own interface, with custom graphics and sliders on top of the camera preview and even with the ability to zoom the preview image in real-time.
My question is: how can one do that and not be crucified by Apple?
thanks for any insight!
As far as I know, it's been hit and miss. Some apps get through, some don't, and it's really quite annoying (as is app approval in general).
In SDK 3.1, there is a new Camera Overlay concept, where you can overlay your own view on top of the camera view. You can find more documentation on the iPhone Developer website (since it is 3.1, it is under NDA).
How can I take a picture in my iPhone app without going through the camera interface?
I've read things about CameraController. Is that what I should look into, or is there an easier way to just snap a picture with code?
You cant access the camera without the iphone API, however what they have allowed is for you to provide your custom view to be used on top of the camera interface, what you have to do is set the cameraOverlayView property of a UIImagePIckerController, here is the reference, as the solution posted in the comment points out, you might be able to access the camera, but through private frameworks which could hurt your chances of approval to the appstore