用于UILabel设置textAlignment时除去警告的宏定义
来源:互联网 发布:translator翻译软件 编辑:程序博客网 时间:2024/06/06 10:40
#ifndef __MY_MACROS_H___#define __MY_MACROS_H___ #ifdef __IPHONE_6_0 #define kTextAlignmentLeft NSTextAlignmentLeft #define kTextAlignmentCenter NSTextAlignmentCenter #define kTextAlignmentRight NSTextAlignmentRight #define kLineBreakModeCharaterWrap NSLineBreakByCharWrapping #define kLineBreakModeWordWrap NSLineBreakByWordWrapping #define kLineBreakModeClip NSLineBreakByClipping #define kLineBreakModeTruncatingHead NSLineBreakByTruncatingHead #define kLineBreakModeTruncatingMiddle NSLineBreakByTruncatingMiddle #define kLineBreakModeTruncatingTail NSLineBreakByTruncatingTail #else #define kTextAlignmentLeft UITextAlignmentLeft #define kTextAlignmentCenter UITextAlignmentCenter #define kTextAlignmentRight UITextAlignmentRight #define kLineBreakModeCharaterWrap UILineBreakModeCharacterWrap #define kLineBreakModeWordWrap UILineBreakModeWordWrap #define kLineBreakModeClip UILineBreakModeClip #define kLineBreakModeTruncatingHead UILineBreakModeHeadTruncation #define kLineBreakModeTruncatingMiddle UILineBreakModeMiddleTruncation #define kLineBreakModeTruncatingTail UILineBreakModeTailTruncation #endif #define kMainScreenFrame [[UIScreen mainScreen] bounds] #define kMainScreenWidth kMainScreenFrame.size.width #define kMainScreenHeight kMainScreenFrame.size.height-20 #define kApplicationFrame [[UIScreen mainScreen] applicationFrame]#endif
写一个头文件,命名为MyMacros.h, 把上述代码粘贴进去,之后将该文件#import到项目的预加载头文件.pch中去。
0 0
- 用于UILabel设置textAlignment时除去警告的宏定义
- UILabel textAlignment in IOS6
- UILabel textAlignment in IOS6
- UIButton设置 textAlignment 属性的方法
- UIButton设置 textAlignment 属性的方法
- UIButton设置 textAlignment 属性的方法
- UILabel textAlignment 居中 左右对齐
- UILabel的AttributedString设置
- UILabel的所有设置
- 设置UILabel的内边距
- UIButton textAlignment设置和一些属性设置
- CDEFINES用于定义C语言使用的宏定义
- UILabel的相关属性设置
- iOS 设置UILabel的背景图片
- UILabel的相关属性设置
- 设置UILabel的内间距
- UILabel的相关属性设置
- 设置UIlabel的行高
- #R#RWeka的介绍
- 在ASP.NET MVC3 中利用JSONP跨域登录WEB系统
- javaScript 除了第三方库 优秀的js框架、js库
- 史上最全设计模式导学目录(完整版)
- linux如何选择方向
- 用于UILabel设置textAlignment时除去警告的宏定义
- 简译 Relationships and Fetched Properties
- Android 获取view在屏幕中的位置
- struts2 向action提交list
- Android启动页面整理
- Linux DebugFS 子目录也是用debugfs_create_dir来实现
- 丑数
- IOS观察者模式与通知中心
- Windows XP搭建Win Phone7开发环境