Ios 苹果的摄像头覆盖示例——APLViewController.m
我真的觉得苹果的例子是围绕UIImagePickerController工作的一个良好开端: 但是,, 有一些东西似乎是覆盖层的核心,我不明白。项目运行得非常好,我只是希望有人能解释一下这里发生了什么: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
/*
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;
我已经做了覆盖其他样本项目,一切都很好。只是这里的做法一定有很好的理由。
感谢您的澄清,我希望这将帮助我的代码覆盖正确的方式