我正在尝试使用以下行创建与通知中心相同的效果,但我不断收到错误消息:
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:[UIVibrancyEffect notificationCenterVibrancyEffect]];
错误:
2014-12-02 16:30:35.597 Trial[11543:1628621] +[UIVibrancyEffect notificationCenterVibrancyEffect]: unrecognized selector sent to class 0x10569ebe0
2014-12-02 16:30:35.602 Trial[11543:1628621] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIVibrancyEffect notificationCenterVibrancyEffect]: unrecognized selector sent to class 0x10569ebe0'
我已经导入了通知中心头文件,但在运行时似乎没有解决这个问题:
#import <NotificationCenter/NotificationCenter.h>