我想做的是让应用程序以相机作为第一个屏幕打开。它不工作,我不知道我错过了什么。如果有人可以填写我,那就太好了……谢谢。
- (void)viewDidLoad
{
[super viewDidLoad];
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
}
else
{
[imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
}
}