lib/ios/sugarcube-constants/symbol.rb in sugarcube-2.0.1 vs lib/ios/sugarcube-constants/symbol.rb in sugarcube-2.0.2

- old
+ new

@@ -58,13 +58,19 @@ SugarCube.look_in(self, Symbol.nstextalignment) end alias nsalignment nstextalignment def uilinebreakmode - SugarCube.look_in(self, Symbol.uilinebreakmode, Symbol.uilinebreakmode__deprecated) + SugarCube.log('uilinebreakmode is deprecated. Use nslinebreakmode instead.') + SugarCube.look_in(self, Symbol.nslinebreakmode) end + def nslinebreakmode + SugarCube.look_in(self, Symbol.nslinebreakmode) + end + alias nslinebreak nslinebreakmode + def uibaselineadjustment SugarCube.look_in(self, Symbol.uibaselineadjustment, Symbol.uibaselineadjustment__deprecated) end alias uibaseline uibaselineadjustment @@ -240,12 +246,11 @@ attr :uireturnkey__deprecated attr :uikeyboardtype attr :uikeyboardtype__deprecated attr :uitextalignment attr :nstextalignment - attr :uilinebreakmode - attr :uilinebreakmode__deprecated + attr :nslinebreakmode attr :uibaselineadjustment__deprecated attr :uibaselineadjustment attr :uibordertype attr :nsdatestyle attr :nsnumberstyle @@ -413,25 +418,30 @@ left: NSTextAlignmentLeft, right: NSTextAlignmentRight, center: NSTextAlignmentCenter, } - @uilinebreakmode__deprecated = { - wordwrap: :word_wrap, - characterwrap: :character_wrap, - headtruncation: :head_truncation, - tailtruncation: :tail_truncation, - middletruncation: :middle_truncation, + @nslinebreakmode = { + word_wrapping: NSLineBreakByWordWrapping, + word_wrap: NSLineBreakByWordWrapping, + word: NSLineBreakByWordWrapping, + char_wrapping: NSLineBreakByCharWrapping, + char_wrap: NSLineBreakByCharWrapping, + character_wrap: NSLineBreakByCharWrapping, + char: NSLineBreakByCharWrapping, + clipping: NSLineBreakByClipping, + clip: NSLineBreakByClipping, + truncating_head: NSLineBreakByTruncatingHead, + head_truncation: NSLineBreakByTruncatingHead, + head: NSLineBreakByTruncatingHead, + truncating_tail: NSLineBreakByTruncatingTail, + tail_truncation: NSLineBreakByTruncatingTail, + tail: NSLineBreakByTruncatingTail, + truncating_middle: NSLineBreakByTruncatingMiddle, + middle_truncation: NSLineBreakByTruncatingMiddle, + middle: NSLineBreakByTruncatingMiddle } - @uilinebreakmode = { - word_wrap: UILineBreakModeWordWrap, - character_wrap: UILineBreakModeCharacterWrap, - clip: UILineBreakModeClip, - head_truncation: UILineBreakModeHeadTruncation, - tail_truncation: UILineBreakModeTailTruncation, - middle_truncation: UILineBreakModeMiddleTruncation, - } @uibaselineadjustment__deprecated = { alignbaselines: :align_baselines, aligncenters: :align_centers, } @@ -545,11 +555,13 @@ info: UIButtonTypeInfoLight, info_light: UIButtonTypeInfoLight, info_dark: UIButtonTypeInfoDark, contact: UIButtonTypeContactAdd, contact_add: UIButtonTypeContactAdd, - system: UIButtonTypeSystem, } + if defined?(UIButtonTypeSystem) + @uibuttontype[:system] = UIButtonTypeSystem + end @uicontrolstate = { normal: UIControlStateNormal, highlighted: UIControlStateHighlighted, disabled: UIControlStateDisabled,