typedef NS_OPTIONS (NSInteger, YYTextLineStyle) {
// basic style (bitmask:0xFF)
YYTextLineStyleNone = 0x00, ///< ( ) Do not draw a line (Default).
YYTextLineStyleSingle = 0x01, ///< (──────) Draw a single line.
YYTextLineStyleThick = 0x02, ///< (━━━━━━━) Draw a thick line.
YYTextLineStyleDouble = 0x09, ///< (══════) Draw a double line.
// style pattern (bitmask:0xF00)
YYTextLineStylePatternSolid = 0x000, ///< (────────) Draw a solid line (Default).
YYTextLineStylePatternDot = 0x100, ///< (‑ ‑ ‑ ‑ ‑ ‑) Draw a line of dots.
YYTextLineStylePatternDash = 0x200, ///< (— — — —) Draw a line of dashes.
YYTextLineStylePatternDashDot = 0x300, ///< (— ‑ — ‑ — ‑) Draw a line of alternating dashes and dots.
YYTextLineStylePatternDashDotDot = 0x400, ///< (— ‑ ‑ — ‑ ‑) Draw a line of alternating dashes and two dots.
YYTextLineStylePatternCircleDot = 0x900, ///< (••••••••••••) Draw a line of small circle dots.
};
这段代码是我在一个框架上看到的,一般枚举值都用十进制,但是这段代码用十六进制,有什么好处?
我是一名优秀的程序员,十分优秀!