thermogl / TITokenField

An iOS version of the NSTokenField (See To: field in Mail and Messages).
http://thermoglobalnuclearwar.com/opensource/
600 stars 172 forks source link

UILineBreakModeTailTruncation deprecated in iOS 6 #59

Closed y0hnn closed 11 years ago

y0hnn commented 11 years ago

Hello !

Just a warning :

TITokenField.m:987:40: 'UILineBreakModeTailTruncation' is deprecated: first deprecated in iOS 6.0

Thanks !

thermogl commented 11 years ago

The replacement (NSLineBreakByTruncatingTail) breaks support for iOS 5.

y0hnn commented 11 years ago

why not adding a define to see if iOS > 5 ?

thermogl commented 11 years ago

Makes for messy code. I'll drop support for iOS 5 when iOS 7 is released.

Goyohol commented 7 years ago
 typedef NS_ENUM(NSInteger, NSLineBreakMode) {        /* What to do with long lines */
    NSLineBreakByWordWrapping = 0,         /* Wrap at word boundaries, default */
    NSLineBreakByCharWrapping,        /* Wrap at character boundaries */
    NSLineBreakByClipping,        /* Simply clip */
    NSLineBreakByTruncatingHead,    /* Truncate at head of line: "…wxyz" */
    NSLineBreakByTruncatingTail,    /* Truncate at tail of line: "abcd…" */
    NSLineBreakByTruncatingMiddle    /* Truncate middle of line:  "ab…yz" */
} NS_ENUM_AVAILABLE_IOS(6_0)

we use now!