2014-09-22 2 views
0

보기를 위해 UIBlurEffectUIVibrancyEffect을 사용하고 있습니다.선택자 알림에 대한 알려진 클래스 메소드가 없습니다. CenterVibrancyEffect iOS 8

Apple docs here은 "notificationCenterVibrancyEffect"를 요청하지만 내 수업에서 UIKit을 가져온 후에도 No known class method for selector notificationCenterVibrancyEffect을 던집니다.

코드는 다음과 같습니다, 다른 모든 클래스 메소드는 잘 해결 :

UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; 
UIVibrancyEffect *vibrancyEffect = [UIVibrancyEffect notificationCenterVibrancyEffect]; 
UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; 
UIVisualEffectView *vibrancyEffectView = [[UIVisualEffectView alloc] initWithEffect:vibrancyEffect]; 
+0

사용중인 iOS 버전은 무엇입니까? 이 내용은 "iOS 8.0 이상"에 포함되어 있습니다. –

+0

죄송합니다, 분명하다고 생각했습니다. 예 모든 대상이 iOS 8로 설정되었습니다. – brandonscript

+0

Swift와 상호 작용합니까? 문서는 Obj-C가 사용할 수있는 방법 만 보여줍니다. – Fogmeister

답변

2

이 "오늘"확장에만 사용할 수 있습니다. "Today"확장 클래스의 프로젝트에서 새 대상을 만들고보기 컨트롤러에 코드를 추가하면 잘 빌드됩니다.

방법 + (UIVibrancyEffect *)notificationCenterVibrancyEffect;이라는 헤더 파일에서 NotificationCenter 프레임 워크에 NotificationCenter라는 이름의 클래스 UIVibrancyEffect의 범주에 선언하고, 선언 NCWidgetProviding.h

시도 :보기 컨트롤러에서 #import <NotificationCenter/NotificationCenter.h>, 난을 구축 할 수 있었다 이 방법으로 코드를 샘플 프로젝트.

관련 문제