iphone - UIImagePicker Controller : How do I add button and select photo

标签 iphone ios objective-c ios4

enter image description here

如何添加按钮和选择照片。请帮助并告诉我如何解决

最佳答案

您需要创建一个 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 - UIImagePicker Controller : How do I add button and select photo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16717992/

相关文章:

iphone - 令人恼火 - 可执行文件使用无效的权利进行签名

ios - Stripe 和 Apple Pay 无法在 iOS 应用程序中使用

ios - UISwitch thumbTintColor 去除阴影

objective-c - 我们什么时候在 Objective-C 中使用 "->"?

iphone - 如何使用 CFURLCreateFromFileSystemRepresentation

iphone - popViewControllerAnimated 上未调用 willAnimateRotationToInterfaceOrientation

iphone - 将 MPMediaItem(播客)标记为已收听

ios - 未调用 CLLocation Manager 委托(delegate)?

ios - iOS 版 Adob​​e Flash/Flex 与 MonoTouch 相比如何?

ios - AWS Cognito Credentials Provider for IOS - 访问 key 和 secret key 为零