tags:

views:

358

answers:

0

In my application,I want to open the camera in Video mode.So I write the following codes


- (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;
}

This code is good for iPhone 3.1.3 but, on iOS4 does not work. Can I use UIImagePickerController as a Video on iOS4?