独狼

导航

xcode6 使用pch出错解决办法

 

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

posted on 2015-01-10 15:29  独狼  阅读(125)  评论(0编辑  收藏  举报