我想在自動佈局的iPhone應用程序中使用GPUImageView。我試過類似於:GPUImageView與自動佈局
_imageView = [[GPUImageView alloc] init];
[self addSubview:_imageView];
[_imageView setTranslatesAutoresizingMaskIntoConstraints:NO];
_gpuImage = [[GPUImagePicture alloc] initWithImage:image];
[_gpuImage addTarget:_imageView];
[_gpuImage processImage];
GPUImageView在構建和運行項目時似乎不可見。
如果我刪除所有自動佈局約束並使用initWithFrame初始化_imageView,它清晰可見。所以,我想知道GPUImageView是否適用於自動佈局?我是否需要做更多的事情才能看到它?
更新:GPUImage通過可可豆莢(〜0.1.4)安裝。我不確定是否有任何新錯誤更新。
也許您使用的約束有一些問題? –
我應該在之前提到過 - 具有完全相同的約束,當我用UIImageView替換GPUImageView時,它似乎正確地顯示圖像。 – user3154427