1

Apple の例は、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