Xcode6后添加ProjectName-Prefix.pch

2016-05-31  本文已影响49人  WeeverLu

参考:http://stackoverflow.com/questions/24158648/why-isnt-projectname-prefix-pch-created-automatically-in-xcode-6

Without the question if it is proper or not, you can add PCH file manually:




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
上一篇 下一篇

猜你喜欢

热点阅读