首页 > 代码库 > xcode6 使用pch出错解决办法

xcode6 使用pch出错解决办法

 

1down vote

If you decide to add a .pch file manually and you want to use Objective-C just like before xCode 6 you will also have to import UIKit and Foundation frameworks in the .pch file. Otherwise you will have to import these frameworks manually in each header file. You can add the following code anyway as it tests for the language used:

#ifdef __OBJC__    #import <UIKit/UIKit.h>    #import <Foundation/Foundation.h>#endif

                                                             -----摘自 stackoverflow

xcode6 使用pch出错解决办法