ios使用预编译命令解决有关问题
ios使用预编译命令解决问题
对于MacOS设备不同,做出相应响应
pch是对整个项目的预编译
对于MacOS设备不同,做出相应响应
#if TARGET_OS_IPHONE //iPhone真机 #elif TARGET_OS_MAC //Mac下 #elif TARGET_IPHONE_SIMULATOR //iPhone模拟器 #endif //结束
pch是对整个项目的预编译
#ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import "AppDelegate.h" #endif