Created
April 11, 2014 01:43
-
-
Save TomLiu/10436580 to your computer and use it in GitHub Desktop.
Macro of text alignment for iOS5 and later
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef NSTextAlignmentCenter | |
#define BLTextAlignmentCenter NSTextAlignmentCenter | |
#define BLTextAlignmentLeft NSTextAlignmentLeft | |
#define BLTextAlignmentRight NSTextAlignmentRight | |
#define BLTextTruncationTail NSLineBreakByTruncatingTail | |
#define BLTextTruncationMiddle NSLineBreakByTruncatingMiddle | |
#else | |
#define BLTextAlignmentCenter UITextAlignmentCenter | |
#define BLTextAlignmentLeft UITextAlignmentLeft | |
#define BLTextAlignmentRight UITextAlignmentRight | |
#define BLTextTruncationTail UILineBreakModeTailTruncation | |
#define BLTextTruncationMiddle UILineBreakModeMiddleTruncation | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment