美文网首页
iOS 宏定义

iOS 宏定义

作者: 南城OS | 来源:发表于2016-07-27 16:03 被阅读0次

///屏幕宽度

#define KSCREENWIDTH [UIScreen mainScreen].bounds.size.width

///屏幕高度

#define KSCREENHEIGHT [UIScreen mainScreen].bounds.size.height

//系统使用

#define FileManager [NSFileManager defaultManager]

#define UserDefaults [NSUserDefaults standardUserDefaults]

//提示框

#define alertMsg(msg) {UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"提示" message:msg delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];[alert show];}

//DLog

#ifdef DEBUG

#define DLog(...) NSLog(@"%s %d \n %@\n\n",__func__,__LINE__,[NSString stringWithFormat:__VA_ARGS__])

#else

#define DLog(...)

#endif

//字体适配

//iphone4 14 iphone5 15 iphone 16 iphone 17

#define ITrip_FONTSIZE    IS_IPHONE4S ? 14:IS_IPHONE5 ?15:IS_IPhone6?16:17

相关文章

  • IOS NSLog宏定义

    IOS NSLog宏定义 标签(空格分隔): IOS IOS NSLog宏定义 宏定义NSLog方法,不用加";"...

  • iOS 宏定义

    初学ios不久时间,对ios的宏定义充满好奇,宏的各种高级用法让ios代码变得优雅,那么宏究竟是什么,让我来花时间...

  • iOS 宏定义

    debug时打印,下面一句是解决xcode8打印不全的问题; 屏幕宽高,或者比例 NSUserDefaults 存...

  • iOS 宏定义

    ///屏幕宽度 #define KSCREENWIDTH [UIScreen mainScreen].bounds...

  • iOS宏定义

    1 weakself和strongself #ifndef weakify #if DEBUG #ifhas_fe...

  • iOS宏定义

    1. 宏定义简介 宏定义是使用#define将某段代码、字符串等一串的文字,用一个宏来代替的一种预处理方式。 2....

  • iOS 宏定义

  • iOS-常用宏定义

    [转自:iOS常用宏定义][http://www.cocoachina.com/ios/20161207/1831...

  • iOS常用宏定义

    打印日志的几种写法 推荐文章iOS 日常工作之常用宏定义大全iOS常用宏定义 结束语 到这里就结束了,如若不懂的话...

  • iOS之宏定义

    iOS开发小技巧之--WeakSelf宏的进化 宏定义不是C语句,也无须使用分号结束 宏定义并不是变量,它甚至不是...

网友评论

      本文标题:iOS 宏定义

      本文链接:https://www.haomeiwen.com/subject/jhbojttx.html