PDA

View Full Version : Need to simulate Camera of iphone simulator




ilx.mac
Apr 17, 2009, 02:33 AM
I need to simulate the camera of iphone through code. I know that its possible. But I am not sure on how to perform that action. can some one help me on this?



chbeer
Apr 17, 2009, 04:56 AM
I never heard that it's possible... so why are you that shure? where did you get that information from?

mccannmarc
Apr 17, 2009, 05:31 AM
It isn't possible, although I can't see why Apple couldn't have given the simulator the ability to use the iSight camera built into the majority of Macs to simulate the camera functionality

ilx.mac
Apr 17, 2009, 07:52 AM
I came across some forums & they said its possible. But u cant view the action on the simulator. for the same it will work on iphone. So, is there a code sample to make it work?

Jeremy1026
Apr 17, 2009, 08:09 AM
Can't be done, put it on your phone to test it.

robbieduncan
Apr 17, 2009, 08:12 AM
I came across some forums & they said its possible.

So why not ask them: we all seem pretty sure you can't do it in the simulator (just like sending email or SMS messages don't work in the simulator).

ilx.mac
Apr 17, 2009, 08:16 AM
I know you guys have pretty much experience than the others. So, now I believe that its not possible with simulator. Will it work with iphone? If yes, can some one provide me guidance? Please!

robbieduncan
Apr 17, 2009, 08:19 AM
I know you guys have pretty much experience than the others. So, now I believe that its not possible with simulator. Will it work with iphone? If yes, can some one provide me guidance? Please!

Will what work? Using the camera? Yes, you can use it using the normal API as covered in the developer documentation. I suggest you go read it....

ilx.mac
Apr 17, 2009, 08:27 AM
if possible can you please be specific on what i should look @. (ie., some class/ framework name & its methods) Please!

Jeremy1026
Apr 17, 2009, 08:45 AM
if possible can you please be specific on what i should look @. (ie., some class/ framework name & its methods) Please!

UIImagePickerController

ilx.mac
May 7, 2009, 02:21 AM
Thanks for the inputs & it worked.

This is what i used:

UIImagePickerController *picker = [[[UIImagePickerController alloc] init] autorelease];
[picker setDelegate:self];
[picker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[self.navigationController presentModalViewController:picker animated:YES];