UIImagePickerController on iPhone 4 device - iphone

This is no typical programming question.
I am currently developing an app using the latest SDK. This app will use the UIImagePickerController for taking pictures with the built-in camera.
I know the new iPhone 4 has 2 cameras built in. But the simulator doesn't support the camera in any way, so there's is now way to test the camera controller on a new iPhone. I do have a iPhone 3G to test my app with.
But what I want to know now, if someone can provide me a screenshot of the UIImagePickerController in camera mode running on his iPhone 4? But I really need an image from the UIImagePickerController not from the common camera application on the iPhone, because those two image pickers aren't the same! I can see this on my iPhone 3G: the built-in camera application and the UIImagePickerController are having a totally different UI.
Why I am asking for that? Because I want to know if there is a built-in switch in UIImagePickerController to switch between the front and rear camera. I know there is such a switch if you want to take a picture using the common iPhone 4 camera application, but I don't know if this switch also exists in UIImagePickerController from the SDK.
Thanks for your help!
C YA

Here you go. I managed to catch it with the zoom control and focus square.

Related

removing 2x button resizing the app screen size in air project

hey guys i'm currently developing a game that will run in iPad and iPhone using AIR with flash develop. and one of my task is to remove the 2x button on the lower right corner of the screen when run in iPad. can anyone there know the solution for this?
This is becuase your app is compiled only for iPhone.
You have two options:
Make the app universal - then it runs on both iPhones and iPads.
Make another different app for iPad.
There are pros and cons for both options.
Read more here in Apple's documentation: Creating a Universal App

xcode Use the same images and xibs for iphone and ipad

I am at the start of a new game. My last game was for the iPhone, and it had to double up for iPad.
Now with the iPhone 5 screen being larger than 4, and iPad and iPad mini, I want to program the game to display the correct size images. Is it possible to design large graphic for iPad and use the same images for iPhone (just display the image smaller when using iPhone 4 etc) or is it best to use two lots of images, iPad version and iPhone version? The problem here would be the size of the app. The App would double the download and install size as the graphics would be quite large, and this isnt something I want to do.
Is it possible to use the same xib for ipad and iphone, and then I could just get the code to detect the screen size and display the game correctly based on that?
Also, I have started the project as Cocos2d with Box2d with the latest download of Cocos2d. It starts off with just the code, should I work from the storyboard instead?
thanks
1) You cannot use single xib file for both iPhone and iPad (programmatically you can but that would screw your app).
2) While doing development using Cocos2D, my experience suggests do not use any xib or storyboard file. Else you will end up in a mess.
3) As far as the question for image size for different iOS devices is concerned, I would suggest you to go with separate images (only typical ones) for different iOS devices. If you have some buttons and simple curve based UI go for CoreGraphics so that you do not need those images. Only use images that are typical ones and use CoreGraphics for rest of the images

How to get a cocos2d app to use iPad?

I have an iPhone app I developed using cocos2d. I have the correct version which supports iPad. Now, how do I get it to change the screen resolution or to recognize that it is an iPad app and not an iPhone app?
You can use the UI_USER_INTERFACE_IDIOM() to figure out in what kind of device your app is running. Anyway, you should always try to layout your stuff relative to the screen size (or the root view controller's view size) so that it will adapt itself to any resolution.
You can make your app use the entire iPad screen and not run in the simulator simply by changing the target device from iPhone to iPhone/iPad in Xcode. If you want your app to show different UI and run different code on the iPad, you can check for the device by using one of several ways to detect an iPad in Objective-C.

About the AirPlay feature in iOS5

As is known to all, the iOS5 has AirPlay feature to let the iPad2 out put the screen in the TV. There is a game(RealRacing 2 HD) which enable this feature to make the 3D graphic to output on the tv and 2D graphic still display on iPad. How can this game do that? The game' demonstrate is here
How can I out put my game like Real Racing 2 HD?
Ok, I will answer my own question.
All I have done is follow the sample on this
When airplay function is ON, the UIScreen will auto generate a external screen, we can manage the EAGLView, separating some to add to the external screen and others add to main screen.
Hope my exp can help some one.

How can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4?

I just finish my iPhone game using cocos2d. But before I put it on the AppStore, I'd like to make it work on iPad (which have a bigger screen) and iPhone 4 (which have a bigger resolution).
So, how can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4, to be able to use the correct coordinates / images in my game?
Thanks for your help!
Between iPad and iPhone — Already answered many times.
Between iPhone and iPhone 4 — The size reported is still 320×480, so you don't need to change anything about the coordinates. Create an #2x alternative for the images if you need a high resolution UI image.