2016-08-26 6 views
0

にALCameraViewControllerのLibrarayを含めるためにはどのようにトリミングVCを持っているスウィフト

https://github.com/AlexLittlejohn/ALCameraViewController

からALCameraViewControllerを含めるようにしたいと思います。

let croppingEnabled = true 
let cameraViewController = CameraViewController(croppingEnabled: croppingEnabled) { [weak self] image, asset in 
    // Do something with your image here. 
    // If cropping is enabled this image will be the cropped version 

    self?.dismissViewControllerAnimated(true, completion: nil) 
} 

presentViewController(cameraViewController, animated: true, completion: nil) 
  • をしかし、問題は「CameraViewControllerが」が見つかりませんされていることを、次のとおりです。説明が言うように CocoaPodsでインポートした後、私は、コードを貼り付けます。
  • 「ALCameraViewControllerをインポートする」必要があると思いますが、「ALCameraViewController」という単語はインポートすることができません。

私は移動する方法を知りませんか?誰でもこの質問を助けるアイデアですか? ありがとうございます!

+0

.xcworkspaceプロジェクトを使用していますか? –

答えて

0

CocoaPodsをインストールしようとしましたか?あなたのUIViewController

YES->

import ALCameraViewController動作するはずです。 .xcworkspaceファイルを開くことを忘れないでください。

NO->(gitHubからダウンロードし、手動でファイルを追加しました)

インポートする必要はありません。プロジェクトが提供する例を使用してください。

+1

ありがとうございます。私は昨日同じことをしました。しかし、今はMacを再起動してもう一度やり直していた。奇妙だが大きな感謝! – fipsikato