问题
In my project I cannot find Prefix.pch file so I create new one, and Build Setting -- prefix header add the file path and name in it projectdir/projectname-Prefix.pch
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#define APP_FONT(fontSize) [UIFont systemFontOfSize:fontSize]
#endif
I can set font without any error warning label.font = APP_FONT(18);
However it crash at running time, APP_FONT(18) returns nil.
It is no problem run on ios8
来源:https://stackoverflow.com/questions/26294233/ios7-1-prefix-pch-not-work