Apple的相机覆盖示例 - APLViewController.m

时间:2014-04-30 14:05:44

标签: ios objective-c uiimagepickercontroller cameraoverlayview

我真的觉得苹果的例子是解决UIImagePickerController的好开始:

APLViewController.m

然而, 有些东西似乎是我不明白的叠加层的核心。该项目工作得很好我只希望有人能解释我在这里发生了什么:

     /* 
     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; 

我已经完成了其他带叠加的示例项目,一切都很好。只是它在这里所做的方式必须是有充分理由的。 感谢您的澄清,我希望这能帮助我以正确的方式编写我的叠加层。

0 个答案:

没有答案