This Blog is for all iOS App Developers to get the code samples and working Code directly from the Blog.Iam requesting to all please add your inputs as well for the Blog can useful to all.
Search This Blog
Wednesday, September 15, 2010
UIImagePickerController
- (void)takePicture:(id)sender
{
NSString *deviceType = [UIDevice currentDevice].model;
if( ![deviceType isEqualToString:@"iPhone"] )
{
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
}
else
{
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment