0

我已经使用本教程实现了一个简单的 iOS 相机应用程序

http://www.appcoda.com/ios-programming-camera-iphone-app/

并试图让它在 Galaxy s 4 上运行。

该应用程序由一个用于显示照片的 UIImageView 和 2 个按钮组成。一个用相机拍照,一个选择照片。这些按钮连接到这些操作:

- (IBAction)takePhoto:(UIButton *)sender {

UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;

[self presentViewController:picker animated:YES completion:NULL];

}

-(IBAction)selectPhoto:(UIButton *)sender {

UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

[self presentViewController:picker animated:YES completion:NULL];

}

该应用程序在我的 iOS 设备上运行良好,但它只是在 android 设备上崩溃。有谁知道,为什么这不起作用或如何在具有适当性的跨平台应用程序中实现相机访问?

4

1 回答 1

1

在这个版本的 Apportable 中没有完全实现对相机的访问。如果您有一个需要它的应用程序,直接使用 BridgeKit 添加它是相当简单的。我们目前正在开发完整的相机支持,我们将在它准备好供一般使用时发布它。

于 2013-12-03T03:39:29.470 回答