AP.
AP.

Reputation: 5323

use uiimagepicker as main view of the application

More or less, everything is in the title: how to use a UIImagePicker as the main view of the application like for instance for an Augmented Reality App?

Thanks in advance for your help,

Regards,

Upvotes: 1

Views: 563

Answers (1)

Brad The App Guy
Brad The App Guy

Reputation: 16275

This should help you:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
        UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];      
        imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
        imagePicker.showsCameraControls = NO;
        [window addSubview:imagePicker.view];
    }
    [window makeKeyAndVisible];
    return YES;
}

Upvotes: 2

Related Questions