Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 苹果的摄像头覆盖示例——APLViewController.m_Ios_Objective C_Uiimagepickercontroller_Cameraoverlayview - Fatal编程技术网

Ios 苹果的摄像头覆盖示例——APLViewController.m

Ios 苹果的摄像头覆盖示例——APLViewController.m,ios,objective-c,uiimagepickercontroller,cameraoverlayview,Ios,Objective C,Uiimagepickercontroller,Cameraoverlayview,我真的觉得苹果的例子是围绕UIImagePickerController工作的一个良好开端: 但是,, 有一些东西似乎是覆盖层的核心,我不明白。项目运行得非常好,我只是希望有人能解释一下这里发生了什么: /* Load the overlay view from the OverlayView nib file. Self is the File's Owner for the nib file, so the overlayView outlet is set

我真的觉得苹果的例子是围绕UIImagePickerController工作的一个良好开端:

但是,, 有一些东西似乎是覆盖层的核心,我不明白。项目运行得非常好,我只是希望有人能解释一下这里发生了什么:

     /* 
     Load the overlay view from the OverlayView nib file. 
     Self is the File's Owner for the nib file, so the overlayView outlet is set 
     to the main view in the nib. Pass that view to the image picker controller 
     to use as its overlay view, and set self's reference to the view to nil. 
     */ 
    [[NSBundle mainBundle] loadNibNamed:@"OverlayView" owner:self options:nil]; 
    self.overlayView.frame = imagePickerController.cameraOverlayView.frame; 
    imagePickerController.cameraOverlayView = self.overlayView; 
    self.overlayView = nil; 
我已经做了覆盖其他样本项目,一切都很好。只是这里的做法一定有很好的理由。 感谢您的澄清,我希望这将帮助我的代码覆盖正确的方式