Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-01-2009, 10:52 AM   #2 (permalink)
johnqh
Registered Member
 
Join Date: Nov 2008
Posts: 812
johnqh is on a distinguished road
Default

Quote:
Originally Posted by aryaxt View Post
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
johnqh is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,639
Threads: 94,102
Posts: 402,830
Top Poster: BrianSlick (7,990)
Welcome to our newest member, sCarlRodriguezj
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:09 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.