关于UIImagePickerController的Camera结构

关于UIImagePickerController的使用很简单,系统自带的效果也很不错,一般情况已经足够我们使用了。但是有些时候项目需求需要必须得自定义Camera界面时就要用到UIImagePickerController的结构了。(关于自定义拍照界面,也可以使用AVFoundation来实现,AVFoundation感觉约束小,可以随便自定义,但界面的效果似乎不如系统自带UIImagePickerController好,所以我最终还是选择的了自定义UIImagePickerController)。

 

    UIView *cameraView = [self findView:viewController.view withName:@"PLImagePickerCameraView"];

    if (cameraView == nil)

    {

        cameraView = [self findView:viewController.view withName:@"PLCameraView"];

    }

    UIView *bottomBar = [self findView:cameraView withName:@"CAMBottomBar"];

    UIButton *shutterButton = (UIButton *)[self findView:bottomBar withName:@"CAMShutterButton"];

    [shutterButton addTarget:self action:@selector(didShutterButtonClick:) forControlEvents:UIControlEventTouchUpInside];

 

1. DEVICE <= iPhone4: 

PLCameraView

    UIView

        UIView

            UIView

                PLCameraPreviewView

                    UIView

                        UIView

                        UIView

                            PLVideoPreviewView

                            UIView

    CAMTopBar

        UIView

        CAMFlashButton

            UIImageView

            CAMButtonLabel

                UILabel

            CAMButtonLabel

                UILabel

            CAMButtonLabel

                UILabel

        CAMFlipButton

    CAMBottomBar

        CAMShutterButton

            UIView

            UIView

        UIButton

            UIButtonLabel

    PLCropOverlay

        PLCropOverlayBottomBar

            PLCropOverlayPreviewBottomBar

                UIButton

                    UIButtonLabel

                UIButton

                UIButton

                    UIButtonLabel

        UIView

            UIView

            UIView

            UIView

            UIView

            UIView

            UIView

    CAMFlashBadge

 

 

2. DEVICE >= iPhone5

 

PLImagePickerCameraView:

    UIView

        UIView

            CAMPreviewView

                UIView

                    UIView

                    UIView

            CAMBlurredSnapshotView

 

    CAMTopBar

        UIView

        UIView

        CAMFlashButton

            CAMButtonLabel

                UILabel

            CAMButtonLabel

                UILabel

            UIImageView

        CAMFlipButton

            UIImageView

 

    CAMBottomBar

        UIView

        UIView

        UIView

        UIView

        UIView

        UIView

        UIView

        UIView

        CAMShutterButton

            UIView

            UIView

        UIButton

            UIButtonLabel

 

    CAMFlashBadge

 

    PLCropOverlay

        PLCropOverlayBottomBar

            PLCropOverlayPreviewBottomBar

                UIButton

                    UIButtonLabel

                UIButton

                UIButton

                    UIButtonLabel

        UIView

            UIView

            UIView

            UIView

            UIView

            UIView

            UIView

 

2. DEVICE >= iPhone6Plus

。。。

 

你可能感兴趣的:(关于UIImagePickerController的Camera结构)