ios7.1 Prefix.pch not work

戏子无情 提交于 2019-12-10 11:58:16

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!