大佬教程收集整理的这篇文章主要介绍了小结:Swift、OC语言中多target在代码中如何区分,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
#if Target4AppStore self.view.BACkgroundColor = UIColor.yellow//效果在运行appstore target时,通过界面调试工具可看到背景图为黄色 #else self.view.BACkgroundColor = kBGColor #endif
// // ViewController.m // mulTargetsTest // // Created by myl on 2017/4/12. // Copyright © 2017年. All rights reserved. // #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; #if IS_MACRO //macao 版,Xcode缺陷:文本高亮状态不会随着切换scheR_732_11845@e变化,但是运行起来是对的。 #if DEBUG self.view.BACkgroundColor = [UIColor blueColor]; #else self.view.BACkgroundColor = [UIColor brownColor]; #endif #elif IS_BEIJING//北京版 #if DEBUG self.view.BACkgroundColor = [UIColor cyanColor]; #else self.view.BACkgroundColor = [UIColor blackColor]; #endif #elif IS_TIANJING//天津版,还未复制出target,不会走这 #if DEBUG self.view.BACkgroundColor = [UIColor cyanColor]; #else self.view.BACkgroundColor = [UIColor blackColor]; #endif #else//广州版 #if DEBUG self.view.BACkgroundColor = [UIColor redColor]; #else self.view.BACkgroundColor = [UIColor orangeColor]; #endif #endif } @end
以上是大佬教程为你收集整理的小结:Swift、OC语言中多target在代码中如何区分全部内容,希望文章能够帮你解决小结:Swift、OC语言中多target在代码中如何区分所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。