Quote:
Originally Posted by aryaxt
I already asked this question.
I'll ask again maybe i get some help this time 
Do you see anything wrong with the code below.
After loading the view i try to load the camera, but nothing is howing.
Am i missing something?
Code:
@interface DisplayPicture : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
{
UIImagePickerController* imagePicker;
}
@property (nonatomic,retain) UIImagePickerController* imagePicker;
@end
Code:
@implementation DisplayPicture
@synthesize imagePicker;
- (void)viewDidLoad {
[super viewDidLoad];
self.imagePicker = [[UIImagePickerController alloc] init];
self.imagePicker.allowsImageEditing = YES;
self.imagePicker.delegate = self;
//* UIImagePickerControllerSourceTypeCamera : to load the camera
// * UIImagePickerControllerSourceTypePhotoLibrary : to load images from library
//* UIImagePickerControllerSourceTypeSavedPhotosAlbum : loads all images saved
self.imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.allowsImageEditing = YES;
[self presentModalViewController:imagePicker animated:YES];
}
@end
Thanks for any help in advance
|
do not do it in viewDidLoad