About image capturing

Discussion in 'iOS Programming' started by iphonejudy, Oct 13, 2008.

  1. iphonejudy macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #1
    Hi,


    Can we write a code for capturing image through simulator?

    if so,

    Can anybody please give me the idea?

    Thanks
    judy
     
  2. jasonslater macrumors newbie

    Joined:
    Oct 10, 2008
    #2
    The camera isn't available in the simulator.

    What I do is determine if the camera is available and then display either the Camera or the Photo Library:
    Code:
    if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
    	[imagePicker setSourceType: UIImagePickerControllerSourceTypeCamera];
    } else {
    	[imagePicker setSourceType: UIImagePickerControllerSourceTypePhotoLibrary];
    }
     

Share This Page