1

我真的发现苹果的例子是解决 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; 

我已经用覆盖完成了其他示例项目,一切都很好。只是这里的做法一定是有充分理由的。感谢您的澄清,我希望这将帮助我以正确的方式对叠加层进行编码。

4

0 回答 0