Open camera view upon app Startup (iOS6)

前端 未结 1 866
梦谈多话
梦谈多话 2021-01-25 18:37

what im trying to do is to have the app open up with the camera as the first screen. It isn\'t working and i don\'t know what im missing. If anyone can fill me in that would be

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-25 19:30

    Try like that. Hope it helps you:

    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
    
    imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
    
    imagePicker.delegate = self;
    
    [self presentViewController:imagePicker animated:YES completion:nil];
    

    0 讨论(0)
提交回复
热议问题