도움이 되었습니까?

해결책

CIDiskBlur를 사용할 수없고 (iOS SDK 5.1) 및 setFilters:가 사용할 수없는 것으로 보입니다.

레이어의 내용에서 입력 ciImage를 만듭니다.

CIImage *inputImage = [CIImage imageWithCGImage:(CGImageRef)(myCircle.contents)];`
.

필터를 적용하고 결과를 CGImagerEF로 가져 오십시오.

CIFilter *filter = [CIFilter filterWith...];// A filter that is available in iOS or a custom one :)
...
CIImage *outputImage = [filter outputImage];
CIContext *context = [CIContext contextWithOptions:nil];
CGImageRef cgimg = [context createCGImage:outputImage fromRect:[outputImage extent]];
.

마지막으로 cgimageref를 레이어로 설정합니다.

[myCircle setContents:(id)cgimg];
.

이렇게해야합니다.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top