0

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

Jason Zhao
  • 1,278
  • 4
  • 19
  • 36
  • 1
    remove this file , and add into project again – Noor Oct 10 '14 at 07:51
  • http://stackoverflow.com/questions/4159090/how-to-tell-xcode-where-my-info-plist-and-pch-files-are – Noor Oct 10 '14 at 10:30
  • Oh yes buddy, finally I did as you said, delete the file and create a new one and restart the Mac OS (not just xcode) then it back to work, thank you so much for your help bro!!! – Jason Zhao Oct 10 '14 at 16:29

0 Answers0