开发者

use uiimagepicker as main view of the application

开发者 https://www.devze.com 2022-12-22 12:31 出处:网络
More or less, every开发者_如何学Gothing is in the title: how to use a UIImagePicker as the main view of the application like for instance for an Augmented Reality App?

More or less, every开发者_如何学Gothing 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,


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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号