如何添加按钮并选择照片。请帮忙告诉我如何解决
Best Answer-推荐答案 strong>
您需要创建一个 CustomOverlayView。然后像这样配置你的选择器:
overlay = [[CustomOverlayView alloc]initWithFrame:self.view.bounds];
overlay.delegate = self;
picker = [[UIImagePickerController alloc]init];
picker.delegate = self;
picker.navigationBarHidden = YES;
picker.toolbarHidden = YES;
picker.wantsFullScreenLayout = YES;
picker.allowsEditing = YES;
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]){
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
}
else{
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
picker.showsCameraControls = NO;
picker.cameraOverlayView = overlay;
关于iphone - UIImagePickerController : How do I add button and select photo,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/16717992/
|