无法使用通过 cocoaPods 导入的 TSMessage 库中的 class
Cannot use class from TSMessage library imported via cocoaPods
我在swift项目中安装了cocoapods,并通过它安装了TSMessage。没问题,但是当我尝试按照这条指令使用它时:
TSMessage.showNotificationWithTitle("Success Notification !!!", type: .Success)
我收到错误:
Use of unresolved identifier 'TSMessage'
我在桥接中这样包含它 header:
#import <TSMessages/TSMessage.h>
其实我终于在this article中找到了答案,你必须在要使用这个class
的文件顶部添加import TSMessages
我在swift项目中安装了cocoapods,并通过它安装了TSMessage。没问题,但是当我尝试按照这条指令使用它时:
TSMessage.showNotificationWithTitle("Success Notification !!!", type: .Success)
我收到错误:
Use of unresolved identifier 'TSMessage'
我在桥接中这样包含它 header:
#import <TSMessages/TSMessage.h>
其实我终于在this article中找到了答案,你必须在要使用这个class
的文件顶部添加import TSMessages