在我的应用程序中,我想以视频模式打开相机。所以我编写了以下代码
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window addSubview:viewController.view];
[window makeKeyAndVisible];
UIImagePickerController *ipc;
ipc = [[UIImagePickerController alloc] init];
ipc.sourceType = UIImagePickerControllerSourceTypeCamera;
ipc.mediaTypes = [NSArray arrayWithObject:(NSString *) kUTTypeMovie];
[viewController presentModalViewController:ipc animated:YES];
return YES;
}
此代码适用于 iPhone 3.1.3,但在 iOS4 上不起作用。我可以在 iOS4 上使用 UIImagePickerController 作为视频吗?