sugarcube 0.20.25 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/Gemfile +3 -1
  2. data/Gemfile.lock +1 -1
  3. data/README.md +897 -1306
  4. data/Rakefile +3 -7
  5. data/app/uicontrol_controller.rb +2 -2
  6. data/lib/sugarcube-568.rb +1 -9
  7. data/lib/sugarcube-all.rb +18 -0
  8. data/lib/sugarcube-animations.rb +15 -0
  9. data/lib/{sugarcube → sugarcube-animations}/animation_chain.rb +0 -0
  10. data/lib/{sugarcube → sugarcube-animations}/uiview.rb +41 -111
  11. data/lib/sugarcube-anonymous.rb +1 -9
  12. data/lib/sugarcube-attributedstring.rb +1 -9
  13. data/lib/sugarcube-attributedstring/nsattributedstring.rb +2 -11
  14. data/lib/sugarcube-awesome.rb +15 -0
  15. data/lib/sugarcube-awesome/awesome_exts.rb +22 -0
  16. data/lib/sugarcube-classic.rb +26 -0
  17. data/lib/sugarcube-color.rb +15 -0
  18. data/lib/sugarcube-color/fixnum.rb +18 -0
  19. data/lib/sugarcube-color/nsarray.rb +11 -0
  20. data/lib/sugarcube-color/nsstring.rb +16 -0
  21. data/lib/{sugarcube/symbol/symbol_uicolor.rb → sugarcube-color/symbol.rb} +12 -4
  22. data/lib/{sugarcube → sugarcube-color}/uicolor.rb +16 -2
  23. data/lib/sugarcube-color/uiimage.rb +13 -0
  24. data/lib/sugarcube-common.rb +22 -0
  25. data/lib/sugarcube-constants.rb +15 -0
  26. data/lib/sugarcube-constants/symbol.rb +759 -0
  27. data/lib/sugarcube-coregraphics.rb +15 -0
  28. data/lib/{sugarcube → sugarcube-coregraphics}/core_graphics.rb +0 -0
  29. data/lib/sugarcube-corelocation.rb +17 -0
  30. data/lib/{sugarcube → sugarcube-corelocation}/core_location.rb +0 -0
  31. data/lib/sugarcube-events.rb +15 -0
  32. data/lib/{sugarcube → sugarcube-events}/uicontrol.rb +3 -3
  33. data/lib/{sugarcube → sugarcube-events}/uitextview.rb +0 -0
  34. data/lib/sugarcube-factories.rb +15 -0
  35. data/lib/{sugarcube → sugarcube-factories}/nserror.rb +0 -0
  36. data/lib/{sugarcube → sugarcube-factories}/uiactionsheet.rb +3 -1
  37. data/lib/sugarcube-factories/uiactivityindicator.rb +17 -0
  38. data/lib/{sugarcube → sugarcube-factories}/uialertview.rb +3 -3
  39. data/lib/{sugarcube → sugarcube-factories}/uibarbuttonitem.rb +19 -3
  40. data/lib/{sugarcube → sugarcube-factories}/uibutton.rb +10 -10
  41. data/lib/{sugarcube → sugarcube-factories}/uisegmentedcontrol.rb +4 -4
  42. data/lib/{sugarcube → sugarcube-factories}/uitableview.rb +0 -0
  43. data/lib/{sugarcube → sugarcube-factories}/uitableviewcell.rb +3 -7
  44. data/lib/sugarcube-files.rb +15 -0
  45. data/lib/{sugarcube/nsstring_files.rb → sugarcube-files/nsstring.rb} +0 -0
  46. data/lib/sugarcube-foundation.rb +15 -0
  47. data/lib/{sugarcube → sugarcube-foundation}/nsarray.rb +0 -18
  48. data/lib/sugarcube-foundation/nsindexpath.rb +13 -0
  49. data/lib/{sugarcube → sugarcube-foundation}/nsindexset.rb +0 -0
  50. data/lib/sugarcube-foundation/nsstring.rb +31 -0
  51. data/lib/{sugarcube → sugarcube-foundation}/nsurl.rb +0 -4
  52. data/lib/sugarcube-gestures.rb +1 -9
  53. data/lib/sugarcube-image.rb +15 -0
  54. data/lib/sugarcube-image/cicolor.rb +7 -0
  55. data/lib/sugarcube-image/cifilter.rb +772 -0
  56. data/lib/sugarcube-image/ciimage.rb +22 -0
  57. data/lib/sugarcube-image/uicolor.rb +7 -0
  58. data/lib/{sugarcube → sugarcube-image}/uiimage.rb +38 -41
  59. data/lib/sugarcube-indexpath.rb +15 -0
  60. data/lib/{sugarcube/nsindexpath.rb → sugarcube-indexpath/indexpath.rb} +12 -21
  61. data/lib/sugarcube-legacy.rb +15 -0
  62. data/lib/{sugarcube → sugarcube-legacy}/activesupport.rb +0 -0
  63. data/lib/sugarcube-legacy/log.rb +45 -0
  64. data/lib/sugarcube-legacy/symbol.rb +219 -0
  65. data/lib/sugarcube-localized.rb +15 -0
  66. data/lib/sugarcube-localized/nserror.rb +8 -0
  67. data/lib/sugarcube-localized/nsstring.rb +10 -0
  68. data/lib/sugarcube-modal.rb +15 -0
  69. data/lib/{sugarcube → sugarcube-modal}/modal.rb +0 -0
  70. data/lib/sugarcube-notifications.rb +15 -0
  71. data/lib/{sugarcube → sugarcube-notifications}/notifications.rb +0 -0
  72. data/lib/sugarcube-nscoder.rb +15 -0
  73. data/lib/{sugarcube → sugarcube-nscoder}/nscoder.rb +0 -0
  74. data/lib/sugarcube-nsdata.rb +15 -0
  75. data/lib/{sugarcube → sugarcube-nsdata}/nsdata.rb +0 -0
  76. data/lib/sugarcube-nsdata/nsstring.rb +9 -0
  77. data/lib/sugarcube-nsdata/nsurl.rb +7 -0
  78. data/lib/sugarcube-nsdata/uiimage.rb +8 -0
  79. data/lib/sugarcube-nsdate.rb +15 -0
  80. data/lib/{sugarcube → sugarcube-nsdate}/date_parser.rb +0 -0
  81. data/lib/sugarcube-nsdate/fixnum.rb +23 -0
  82. data/lib/{sugarcube → sugarcube-nsdate}/nsdate.rb +6 -1
  83. data/lib/{sugarcube → sugarcube-nsdate}/nsdate_delta.rb +0 -0
  84. data/lib/sugarcube-nsdate/nsstring.rb +16 -0
  85. data/lib/sugarcube-nsuserdefaults.rb +15 -0
  86. data/lib/{sugarcube → sugarcube-nsuserdefaults}/nsuserdefaults.rb +0 -0
  87. data/lib/sugarcube-numbers.rb +15 -0
  88. data/lib/sugarcube-numbers/fixnum.rb +25 -0
  89. data/lib/sugarcube-numbers/nsstring.rb +13 -0
  90. data/lib/{sugarcube → sugarcube-numbers}/numeric.rb +44 -4
  91. data/lib/sugarcube-osx/adjust.rb +373 -0
  92. data/lib/sugarcube-pipes.rb +15 -0
  93. data/lib/sugarcube-pipes/pipes.rb +78 -0
  94. data/lib/sugarcube-pointer.rb +15 -0
  95. data/lib/sugarcube-pointer/nsarray.rb +13 -0
  96. data/lib/sugarcube-repl.rb +1 -9
  97. data/lib/sugarcube-resources.rb +15 -0
  98. data/lib/sugarcube-timer.rb +15 -0
  99. data/lib/{sugarcube → sugarcube-timer}/timer.rb +0 -0
  100. data/lib/sugarcube-to_s.rb +15 -0
  101. data/lib/{sugarcube/to_s → sugarcube-to_s}/nserror.rb +1 -4
  102. data/lib/sugarcube-to_s/nsindexpath.rb +7 -0
  103. data/lib/{sugarcube/to_s → sugarcube-to_s}/nslayoutconstraint.rb +0 -0
  104. data/lib/{sugarcube/to_s → sugarcube-to_s}/nsnotification.rb +0 -0
  105. data/lib/{sugarcube/to_s → sugarcube-to_s}/nsset.rb +0 -0
  106. data/lib/{sugarcube/to_s → sugarcube-to_s}/nsurl.rb +0 -0
  107. data/lib/{sugarcube/to_s → sugarcube-to_s}/uicolor.rb +0 -0
  108. data/lib/{sugarcube/to_s → sugarcube-to_s}/uievent.rb +0 -0
  109. data/lib/{sugarcube/to_s → sugarcube-to_s}/uilabel.rb +0 -0
  110. data/lib/{sugarcube/to_s → sugarcube-to_s}/uitextfield.rb +0 -0
  111. data/lib/{sugarcube/to_s → sugarcube-to_s}/uitouch.rb +0 -0
  112. data/lib/{sugarcube/to_s → sugarcube-to_s}/uiview.rb +0 -0
  113. data/lib/{sugarcube/to_s → sugarcube-to_s}/uiviewcontroller.rb +0 -0
  114. data/lib/sugarcube-uicolor.rb +1 -0
  115. data/lib/sugarcube-uifont.rb +15 -0
  116. data/lib/sugarcube-uiimage.rb +1 -0
  117. data/lib/sugarcube-uikit.rb +15 -0
  118. data/lib/{sugarcube → sugarcube-uikit}/calayer.rb +0 -0
  119. data/lib/sugarcube-uikit/nsattributedstring.rb +12 -0
  120. data/lib/sugarcube-uikit/nsstring.rb +38 -0
  121. data/lib/sugarcube-uikit/symbol.rb +67 -0
  122. data/lib/{sugarcube → sugarcube-uikit}/uifont.rb +1 -4
  123. data/lib/sugarcube-uikit/uiimage.rb +9 -0
  124. data/lib/{sugarcube → sugarcube-uikit}/uilabel.rb +0 -0
  125. data/lib/{sugarcube → sugarcube-uikit}/uipickerview.rb +0 -0
  126. data/lib/sugarcube-uikit/uiview.rb +100 -0
  127. data/lib/{sugarcube → sugarcube-uikit}/uiviewcontroller.rb +0 -0
  128. data/lib/{sugarcube → sugarcube-uikit}/uiwebview.rb +0 -0
  129. data/lib/sugarcube-unholy.rb +1 -9
  130. data/lib/sugarcube.rb +4 -9
  131. data/lib/sugarcube/adjust.rb +1 -0
  132. data/lib/sugarcube/look_in.rb +22 -0
  133. data/lib/sugarcube/version.rb +1 -1
  134. data/runtests +1 -1
  135. data/spec/{uicolor_components_spec.rb → color_components_spec.rb} +0 -0
  136. data/spec/{uicolor_other_representations_spec.rb → color_other_representations_spec.rb} +0 -0
  137. data/spec/{uicolor_spec.rb → color_spec.rb} +0 -0
  138. data/spec/image_cifilters_spec.rb +549 -0
  139. data/spec/{uiimage_color_at_spec.rb → image_color_at_spec.rb} +0 -0
  140. data/spec/{uiimage_scale_spec.rb → image_scale_spec.rb} +0 -0
  141. data/spec/image_uiimage_filters_spec.rb +47 -0
  142. data/spec/nsdate_spec.rb +11 -0
  143. data/spec/nsurl_spec.rb +1 -1
  144. data/spec/numeric_spec.rb +10 -0
  145. data/spec/pipes_spec.rb +135 -0
  146. data/spec/sugarcube_legacy.rb +59 -0
  147. data/spec/symbol_constants_spec.rb +809 -0
  148. data/spec/symbol_uicolor_spec.rb +20 -4
  149. data/spec/symbol_uifont_spec.rb +30 -0
  150. data/spec/uiactionsheet_spec.rb +1 -1
  151. data/spec/uialertview_spec.rb +1 -1
  152. data/spec/uibarbuttonitem_spec.rb +46 -46
  153. data/sugarcube.gemspec +1 -1
  154. metadata +142 -74
  155. data/lib/sugarcube/exceptions.rb +0 -2
  156. data/lib/sugarcube/fixnum.rb +0 -59
  157. data/lib/sugarcube/nsstring.rb +0 -107
  158. data/lib/sugarcube/symbol.rb +0 -766
  159. data/lib/sugarcube/uiactivityindicator.rb +0 -17
  160. data/lib/sugarcube/uuid.rb +0 -10
  161. data/spec/activesupport_spec.rb +0 -96
  162. data/spec/symbol_spec.rb +0 -32
@@ -0,0 +1,26 @@
1
+ ignore = [
2
+ 'sugarcube-all.rb',
3
+ 'sugarcube-common.rb',
4
+ 'sugarcube-classic.rb',
5
+ 'sugarcube-osx.rb',
6
+ 'sugarcube-legacy.rb',
7
+ 'sugarcube-uicolor.rb',
8
+ 'sugarcube-uiimage.rb',
9
+
10
+ 'sugarcube-568.rb',
11
+ 'sugarcube-anonymous.rb',
12
+ 'sugarcube-attributedstring.rb',
13
+ 'sugarcube-awesome.rb',
14
+ 'sugarcube-gestures.rb',
15
+ 'sugarcube-repl.rb',
16
+ 'sugarcube-unholy.rb',
17
+ ]
18
+
19
+ dirname = File.dirname(__FILE__)
20
+ Dir.glob(File.join(dirname, '*.rb')).each do |file|
21
+ file = File.basename(file)
22
+ unless ignore.include? file
23
+ file = File.join(dirname, file)
24
+ require file
25
+ end
26
+ end
@@ -0,0 +1,15 @@
1
+ unless defined?(Motion::Project::Config)
2
+ raise "The sugarcube gem must be required within a RubyMotion project Rakefile."
3
+ end
4
+
5
+
6
+ Motion::Project::App.setup do |app|
7
+ # scans app.files until it finds app/ (the default)
8
+ # if found, it inserts just before those files, otherwise it will insert to
9
+ # the end of the list
10
+ insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
11
+
12
+ Dir.glob(File.join(File.dirname(__FILE__), 'sugarcube-color/**/*.rb')).reverse.each do |file|
13
+ app.files.insert(insert_point, file)
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ class Fixnum
2
+
3
+ # 0xffffff.uicolor
4
+ # 0xffffff.uicolor(0.33)
5
+ # =>
6
+ # UIColor.colorWithRed(1.0, green:1.0, blue: 1.0, alpha:1.0)
7
+ # UIColor.colorWithRed(1.0, green:1.0, blue: 1.0, alpha:0.33)
8
+ def uicolor(alpha=nil)
9
+ alpha = 1.0 if alpha.nil?
10
+
11
+ red = ((self & 0xFF0000) >> 16).to_f / 255.0
12
+ green = ((self & 0xFF00) >> 8).to_f / 255.0
13
+ blue = (self & 0xFF).to_f / 255.0
14
+
15
+ UIColor.colorWithRed(red, green:green, blue:blue, alpha:alpha.to_f)
16
+ end
17
+
18
+ end
@@ -0,0 +1,11 @@
1
+ class NSArray
2
+
3
+ # [160, 210, 242].uicolor => 0xA0D2F2.uicolor
4
+ def uicolor(alpha=1.0)
5
+ red = self[0] / 255.0
6
+ green = self[1] / 255.0
7
+ blue = self[2] / 255.0
8
+ UIColor.colorWithRed(red, green:green, blue:blue, alpha:alpha.to_f)
9
+ end
10
+
11
+ end
@@ -0,0 +1,16 @@
1
+ class NSString
2
+
3
+ # @return [UIColor]
4
+ def uicolor(alpha=nil)
5
+ if self[0,1] == '#'
6
+ if self.length == 4
7
+ return (self[1] * 2 + self[2] * 2 + self[3] * 2).to_i(16).uicolor(alpha)
8
+ end
9
+ return self[1..-1].to_i(16).uicolor(alpha)
10
+ end
11
+
12
+ img = self.uiimage
13
+ img && img.uicolor(alpha)
14
+ end
15
+
16
+ end
@@ -1,6 +1,7 @@
1
1
  class Symbol
2
2
  class << self
3
3
  attr :uicolors
4
+ attr :uicolors__deprecated
4
5
  attr :css_colors
5
6
  attr :css_colors_cache
6
7
  end
@@ -8,7 +9,7 @@ class Symbol
8
9
  def uicolor(alpha=nil)
9
10
  if Symbol.uicolors.has_key? self
10
11
  # iOS colors
11
- color = UIColor.send(sugarcube_look_in(Symbol.uicolors))
12
+ color = UIColor.send(SugarCube.look_in(self, Symbol.uicolors, Symbol.uicolors__deprecated))
12
13
 
13
14
  if not alpha.nil?
14
15
  color = color.colorWithAlphaComponent(alpha.to_f)
@@ -17,7 +18,7 @@ class Symbol
17
18
  color = Symbol.css_colors_cache[self]
18
19
  else
19
20
  # css colors
20
- color = sugarcube_look_in(Symbol.css_colors).uicolor
21
+ color = SugarCube.look_in(self, Symbol.css_colors).uicolor
21
22
  Symbol.css_colors_cache[self] = color
22
23
  end
23
24
 
@@ -28,15 +29,20 @@ class Symbol
28
29
  color
29
30
  end
30
31
 
32
+ @uicolors__deprecated = {
33
+ darkgray: :dark_gray,
34
+ lightgray: :light_gray,
35
+ }
36
+
31
37
  @uicolors = {
32
38
  black: :blackColor,
33
39
  blue: :blueColor,
34
40
  brown: :brownColor,
35
41
  cyan: :cyanColor,
36
- darkgray: :darkGrayColor,
42
+ dark_gray: :darkGrayColor,
37
43
  gray: :grayColor,
38
44
  green: :greenColor,
39
- lightgray: :lightGrayColor,
45
+ light_gray: :lightGrayColor,
40
46
  magenta: :magentaColor,
41
47
  orange: :orangeColor,
42
48
  purple: :purpleColor,
@@ -75,6 +81,8 @@ class Symbol
75
81
  # uikit colors
76
82
  placeholder: 0xb2b2b2, # UITextField placeholder color
77
83
 
84
+ # unlike other places, these do not use snake_case, because they are from
85
+ # the CSS standard names
78
86
  aliceblue: 0xf0f8ff,
79
87
  antiquewhite: 0xfaebd7,
80
88
  aqua: 0x00ffff,
@@ -135,7 +135,7 @@ class UIColor
135
135
  def css_name
136
136
  my_color = self.to_i
137
137
  css_name = nil
138
- Symbol.css_colors.each_pair do |color, hex|
138
+ Symbol.css_colors.each do |color, hex|
139
139
  if hex == my_color
140
140
  css_name = color
141
141
  break
@@ -147,12 +147,26 @@ class UIColor
147
147
  def system_name
148
148
  system_color = nil
149
149
  without_alpha = self.uicolor(1)
150
- Symbol.uicolors.each_pair do |color, method|
150
+ Symbol.uicolors.each do |color, method|
151
151
  if UIColor.send(method) == without_alpha
152
152
  system_color = method
153
153
  break
154
154
  end
155
155
  end
156
+ Symbol.uicolors__deprecated.each do |old_name, new_name|
157
+ method = Symbol.uicolors[new_name]
158
+ if UIColor.send(method) == without_alpha
159
+ message = "The symbol #{old_name.inspect} has been deprecated in favor of #{new_name.inspect}"
160
+ if defined?(SugarCube::Legacy)
161
+ SugarCube::Legacy.log(message)
162
+ else
163
+ NSLog(message)
164
+ end
165
+
166
+ system_color = method
167
+ break
168
+ end
169
+ end
156
170
  return system_color
157
171
  end
158
172
 
@@ -0,0 +1,13 @@
1
+ class UIImage
2
+
3
+ # @return [UIColor]
4
+ def uicolor(alpha=nil)
5
+ color = UIColor.colorWithPatternImage(self)
6
+ if not alpha.nil?
7
+ color = color.colorWithAlphaComponent(alpha.to_f)
8
+ end
9
+
10
+ color
11
+ end
12
+
13
+ end
@@ -0,0 +1,22 @@
1
+ ignore = [
2
+ 'sugarcube-all.rb',
3
+ 'sugarcube-common.rb',
4
+ 'sugarcube-classic.rb',
5
+ 'sugarcube-osx.rb',
6
+ 'sugarcube-legacy.rb',
7
+ 'sugarcube-uicolor.rb',
8
+ 'sugarcube-uiimage.rb',
9
+
10
+ 'sugarcube-anonymous.rb',
11
+ 'sugarcube-awesome.rb',
12
+ 'sugarcube-unholy.rb',
13
+ ]
14
+
15
+ dirname = File.dirname(__FILE__)
16
+ Dir.glob(File.join(dirname, '*.rb')).each do |file|
17
+ file = File.basename(file)
18
+ unless ignore.include? file
19
+ file = File.join(dirname, file)
20
+ require file
21
+ end
22
+ end
@@ -0,0 +1,15 @@
1
+ unless defined?(Motion::Project::Config)
2
+ raise "The sugarcube gem must be required within a RubyMotion project Rakefile."
3
+ end
4
+
5
+
6
+ Motion::Project::App.setup do |app|
7
+ # scans app.files until it finds app/ (the default)
8
+ # if found, it inserts just before those files, otherwise it will insert to
9
+ # the end of the list
10
+ insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
11
+
12
+ Dir.glob(File.join(File.dirname(__FILE__), 'sugarcube-constants/**/*.rb')).reverse.each do |file|
13
+ app.files.insert(insert_point, file)
14
+ end
15
+ end
@@ -0,0 +1,759 @@
1
+ =begin
2
+ Adds some UI classes to the Symbol class. These methods are prefixed with `ui`
3
+ to make their intent clear, and to provide a little bit of "namespacing"
4
+
5
+ # alignment
6
+ :left.uialignment => UITextAlignmentLeft
7
+
8
+ # uicolors
9
+ :black.uicolor => UIColor.blackColor
10
+
11
+ :darkturquoise.uicolor => UIColor.blackColor
12
+
13
+ You can extend the defaults by adding entries:
14
+
15
+ Symbol.css_colors[:my_color] = 0x123456
16
+
17
+ :my_color.uicolor => UIColor
18
+ =end
19
+ class Symbol
20
+
21
+ def uidevice
22
+ SugarCube.look_in(self, Symbol.uidevice)
23
+ end
24
+
25
+ def uideviceorientation
26
+ SugarCube.look_in(self, Symbol.uideviceorientation)
27
+ end
28
+
29
+ def uiinterfaceorientation
30
+ SugarCube.look_in(self, Symbol.uiinterfaceorientation)
31
+ end
32
+ alias uiorientation uiinterfaceorientation
33
+
34
+ def uiinterfacemask
35
+ SugarCube.look_in(self, Symbol.uiinterfacemask)
36
+ end
37
+
38
+ def uiautoresizemask
39
+ SugarCube.look_in(self, Symbol.uiautoresizemask, Symbol.uiautoresizemask__deprecated)
40
+ end
41
+ alias uiviewautoresizing uiautoresizemask
42
+ alias uiautoresizingmask uiautoresizemask
43
+ alias uiautoresize uiautoresizemask
44
+
45
+ def uireturnkey
46
+ SugarCube.look_in(self, Symbol.uireturnkey, Symbol.uireturnkey__deprecated)
47
+ end
48
+
49
+ def uikeyboardtype
50
+ SugarCube.look_in(self, Symbol.uikeyboardtype, Symbol.uikeyboardtype__deprecated)
51
+ end
52
+
53
+ def uitextalignment
54
+ SugarCube.look_in(self, Symbol.uitextalignment)
55
+ end
56
+ alias uialignment uitextalignment
57
+
58
+ def uilinebreakmode
59
+ SugarCube.look_in(self, Symbol.uilinebreakmode, Symbol.uilinebreakmode__deprecated)
60
+ end
61
+
62
+ def uibaselineadjustment
63
+ SugarCube.look_in(self, Symbol.uibaselineadjustment)
64
+ end
65
+ alias uibaseline uibaselineadjustment
66
+
67
+ def uibordertype
68
+ SugarCube.look_in(self, Symbol.uibordertype)
69
+ end
70
+ alias uiborderstyle uibordertype
71
+
72
+ def nsdatestyle
73
+ SugarCube.look_in(self, Symbol.nsdatestyle)
74
+ end
75
+ alias nsdateformatterstyle nsdatestyle
76
+
77
+ def nsnumberstyle
78
+ SugarCube.look_in(self, Symbol.nsnumberstyle, Symbol.nsnumberstyle__deprecated)
79
+ end
80
+ alias nsnumberformatterstyle nsnumberstyle
81
+
82
+ def uistatusbarstyle
83
+ SugarCube.look_in(self, Symbol.uistatusbarstyle)
84
+ end
85
+
86
+ def uibarmetrics
87
+ SugarCube.look_in(self, Symbol.uibarmetrics)
88
+ end
89
+
90
+ def uibarbuttonitem
91
+ SugarCube.look_in(self, Symbol.uibarbuttonitem, Symbol.uibarbuttonitem__deprecated)
92
+ end
93
+
94
+ def uibarbuttonstyle
95
+ SugarCube.look_in(self, Symbol.uibarbuttonstyle)
96
+ end
97
+
98
+ def uibuttontype
99
+ SugarCube.look_in(self, Symbol.uibuttontype)
100
+ end
101
+
102
+ def uicontrolstate
103
+ SugarCube.look_in(self, Symbol.uicontrolstate)
104
+ end
105
+ alias uistate uicontrolstate
106
+
107
+
108
+ def uicontrolevent
109
+ SugarCube.look_in(self, Symbol.uicontrolevent, Symbol.uicontrolevent__deprecated)
110
+ end
111
+
112
+ def uiactivityindicatorstyle
113
+ SugarCube.look_in(self, Symbol.uiactivityindicatorstyle, Symbol.uiactivityindicatorstyle__deprecated)
114
+ end
115
+ alias uiactivityindicatorviewstyle uiactivityindicatorstyle
116
+
117
+ def uisegmentedstyle
118
+ SugarCube.look_in(self, Symbol.uisegmentedstyle)
119
+ end
120
+ alias uisegmentedcontrolstyle uisegmentedstyle
121
+
122
+ def uidatepickermode
123
+ SugarCube.look_in(self, Symbol.uidatepickermode, Symbol.uidatepickermode__deprecated)
124
+ end
125
+
126
+ def uicontentmode
127
+ SugarCube.look_in(self, Symbol.uicontentmode, Symbol.uicontentmode__deprecated)
128
+ end
129
+ alias uiviewcontentmode uicontentmode
130
+
131
+ def uianimationcurve
132
+ SugarCube.look_in(self, Symbol.uianimationcurve)
133
+ end
134
+ alias uiviewanimationcurve uianimationcurve
135
+
136
+ def uitablestyle
137
+ SugarCube.look_in(self, Symbol.uitablestyle)
138
+ end
139
+ alias uitableviewstyle uitablestyle
140
+
141
+ def uitablerowanimation
142
+ SugarCube.look_in(self, Symbol.uitablerowanimation)
143
+ end
144
+ alias uitableviewrowanimation uitablerowanimation
145
+
146
+ def uitablecellstyle
147
+ SugarCube.look_in(self, Symbol.uitablecellstyle)
148
+ end
149
+ alias uitableviewcellstyle uitablecellstyle
150
+
151
+ def uitablecellaccessorytype
152
+ SugarCube.look_in(self, Symbol.uitablecellaccessorytype, Symbol.uitablecellaccessorytype__deprecated)
153
+ end
154
+ alias uitablecellaccessory uitablecellaccessorytype
155
+ alias uitableviewcellaccessorytype uitablecellaccessorytype
156
+
157
+ def uitablecellselectionstyle
158
+ SugarCube.look_in(self, Symbol.uitablecellselectionstyle)
159
+ end
160
+ alias uitableviewcellselectionstyle uitablecellselectionstyle
161
+
162
+ def uitablecellseparatorstyle
163
+ SugarCube.look_in(self, Symbol.uitablecellseparatorstyle, Symbol.uitablecellseparatorstyle__deprecated)
164
+ end
165
+
166
+ def uialertstyle
167
+ SugarCube.look_in(self, Symbol.uialertstyle)
168
+ end
169
+ alias uialertviewstyle uialertstyle
170
+
171
+ def uiactionstyle
172
+ SugarCube.look_in(self, Symbol.uiactionstyle)
173
+ end
174
+ alias uiactionsheetstyle uiactionstyle
175
+
176
+ def uiimagesource
177
+ SugarCube.look_in(self, Symbol.uiimagesource)
178
+ end
179
+ alias uiimagesourcetype uiimagesource
180
+
181
+ def uiimagecapture
182
+ SugarCube.look_in(self, Symbol.uiimagecapture)
183
+ end
184
+ alias uiimagecapturemode uiimagecapture
185
+
186
+ def uiimagecamera
187
+ SugarCube.look_in(self, Symbol.uiimagecamera)
188
+ end
189
+ alias uiimagecameradevice uiimagecamera
190
+ alias uiimagedevice uiimagecamera
191
+
192
+ def uiimagequality
193
+ SugarCube.look_in(self, Symbol.uiimagequality)
194
+ end
195
+ alias uiimagequalitytype uiimagequality
196
+
197
+ def catimingfunction
198
+ SugarCube.look_in(self, Symbol.catimingfunction, Symbol.catimingfunction__deprecated)
199
+ end
200
+ alias catiming catimingfunction
201
+
202
+ def cglinecap
203
+ SugarCube.look_in(self, Symbol.cglinecap)
204
+ end
205
+ alias cglinecapstyle cglinecap
206
+
207
+ def cglinejoin
208
+ SugarCube.look_in(self, Symbol.cglinejoin)
209
+ end
210
+ alias cglinejoinstyle cglinejoin
211
+
212
+ def uigesturerecognizerstate
213
+ SugarCube.look_in(self, Symbol.uigesturerecognizerstate)
214
+ end
215
+ alias uigesturestate uigesturerecognizerstate
216
+
217
+ class << self
218
+ attr :uidevice
219
+ attr :uideviceorientation
220
+ attr :uiinterfaceorientation
221
+ attr :uiinterfacemask
222
+ attr :uiautoresizemask
223
+ attr :uiautoresizemask__deprecated
224
+
225
+ attr :uireturnkey
226
+ attr :uireturnkey__deprecated
227
+ attr :uikeyboardtype
228
+ attr :uikeyboardtype__deprecated
229
+ attr :uitextalignment
230
+ attr :uilinebreakmode
231
+ attr :uilinebreakmode__deprecated
232
+ attr :uibaselineadjustment
233
+ attr :uibordertype
234
+ attr :nsdatestyle
235
+ attr :nsnumberstyle
236
+ attr :nsnumberstyle__deprecated
237
+
238
+ attr :uistatusbarstyle
239
+ attr :uibarmetrics
240
+ attr :uibarbuttonitem
241
+ attr :uibarbuttonitem__deprecated
242
+ attr :uibarbuttonstyle
243
+
244
+ attr :uibuttontype
245
+ attr :uicontrolstate
246
+ attr :uicontrolevent
247
+ attr :uicontrolevent__deprecated
248
+ attr :uiactivityindicatorstyle
249
+ attr :uiactivityindicatorstyle__deprecated
250
+ attr :uisegmentedstyle
251
+ attr :uidatepickermode
252
+ attr :uidatepickermode__deprecated
253
+ attr :uicontentmode
254
+ attr :uicontentmode__deprecated
255
+ attr :uianimationcurve
256
+
257
+ attr :uitablestyle
258
+ attr :uitablerowanimation
259
+ attr :uitablecellstyle
260
+ attr :uitablecellaccessorytype
261
+ attr :uitablecellaccessorytype__deprecated
262
+ attr :uitablecellselectionstyle
263
+ attr :uitablecellseparatorstyle
264
+ attr :uitablecellseparatorstyle__deprecated
265
+
266
+ attr :uialertstyle
267
+ attr :uiactionstyle
268
+
269
+ attr :uiimagesource
270
+ attr :uiimagecapture
271
+ attr :uiimagecamera
272
+ attr :uiimagequality
273
+
274
+ attr :catimingfunction
275
+ attr :catimingfunction__deprecated
276
+
277
+ attr :cglinecap
278
+ attr :cglinejoin
279
+
280
+ attr :uigesturerecognizerstate
281
+
282
+ end
283
+
284
+ @uidevice = {
285
+ iphone: UIUserInterfaceIdiomPhone,
286
+ ipad: UIUserInterfaceIdiomPad,
287
+ }
288
+
289
+ @uideviceorientation = {
290
+ unknown: UIDeviceOrientationUnknown,
291
+ portrait: UIDeviceOrientationPortrait,
292
+ upside_down: UIDeviceOrientationPortraitUpsideDown,
293
+ left: UIDeviceOrientationLandscapeLeft,
294
+ right: UIDeviceOrientationLandscapeRight,
295
+ face_up: UIDeviceOrientationFaceUp,
296
+ face_down: UIDeviceOrientationFaceDown
297
+ }
298
+
299
+ @uiinterfaceorientation = {
300
+ portrait: UIInterfaceOrientationPortrait,
301
+ upside_down: UIInterfaceOrientationPortraitUpsideDown,
302
+ left: UIInterfaceOrientationLandscapeLeft,
303
+ right: UIInterfaceOrientationLandscapeRight,
304
+ }
305
+
306
+ @uiinterfacemask = {
307
+ portrait: UIInterfaceOrientationMaskPortrait,
308
+ landscrape: UIInterfaceOrientationMaskLandscape,
309
+ left: UIInterfaceOrientationMaskLandscapeLeft,
310
+ right: UIInterfaceOrientationMaskLandscapeRight,
311
+ upside_down: UIInterfaceOrientationMaskPortraitUpsideDown,
312
+ all_but_upside_down: UIInterfaceOrientationMaskAllButUpsideDown,
313
+ iphone: UIInterfaceOrientationMaskAllButUpsideDown,
314
+ all: UIInterfaceOrientationMaskAll,
315
+ ipad: UIInterfaceOrientationMaskAll,
316
+ }
317
+
318
+ @uiautoresizemask__deprecated = {
319
+ full: :fill,
320
+ fixed_top: :fill_top,
321
+ fixed_bottom: :fill_bottom,
322
+ fixed_left: :fill_left,
323
+ fixed_right: :fill_right,
324
+ }
325
+ @uiautoresizemask = {
326
+ none: UIViewAutoresizingNone,
327
+ flexible_left: UIViewAutoresizingFlexibleLeftMargin,
328
+ flexible_width: UIViewAutoresizingFlexibleWidth,
329
+ flexible_right: UIViewAutoresizingFlexibleRightMargin,
330
+ flexible_top: UIViewAutoresizingFlexibleTopMargin,
331
+ flexible_height: UIViewAutoresizingFlexibleHeight,
332
+ flexible_bottom: UIViewAutoresizingFlexibleBottomMargin,
333
+ fill: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight,
334
+ fill_top: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin,
335
+ fill_bottom: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin,
336
+ fill_left: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleRightMargin,
337
+ fill_right: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin,
338
+ fixed_top_left: UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin,
339
+ fixed_top_middle: UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin,
340
+ fixed_top_right: UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleBottomMargin,
341
+ fixed_middle_left: UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin,
342
+ fixed_middle: UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin,
343
+ fixed_middle_right: UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin,
344
+ fixed_bottom_left: UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin,
345
+ fixed_bottom_middle: UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin,
346
+ fixed_bottom_right: UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin,
347
+ float_horizontal: UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin,
348
+ float_vertical: UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin,
349
+ }
350
+
351
+ @uireturnkey__deprecated = {
352
+ emergencycall: :emergency_call
353
+ }
354
+ @uireturnkey = {
355
+ default: UIReturnKeyDefault,
356
+ return: UIReturnKeyDefault,
357
+ go: UIReturnKeyGo,
358
+ google: UIReturnKeyGoogle,
359
+ join: UIReturnKeyJoin,
360
+ next: UIReturnKeyNext,
361
+ route: UIReturnKeyRoute,
362
+ search: UIReturnKeySearch,
363
+ send: UIReturnKeySend,
364
+ yahoo: UIReturnKeyYahoo,
365
+ done: UIReturnKeyDone,
366
+ emergency_call: UIReturnKeyEmergencyCall,
367
+ }
368
+
369
+ @uikeyboardtype__deprecated = {
370
+ asciicapable: :ascii_capable,
371
+ numbersandpunctuation: :numbers_and_punctuation,
372
+ numberpad: :number_pad,
373
+ phonepad: :phone_pad,
374
+ namephonepad: :name_phone_pad,
375
+ nameandphone: :name_and_phone,
376
+ emailaddress: :email_address,
377
+ }
378
+ @uikeyboardtype = {
379
+ default: UIKeyboardTypeDefault,
380
+ ascii_capable: UIKeyboardTypeASCIICapable,
381
+ ascii: UIKeyboardTypeASCIICapable,
382
+ numbers_and_punctuation: UIKeyboardTypeNumbersAndPunctuation,
383
+ url: UIKeyboardTypeURL,
384
+ number_pad: UIKeyboardTypeNumberPad,
385
+ number: UIKeyboardTypeNumberPad,
386
+ phone_pad: UIKeyboardTypePhonePad,
387
+ phone: UIKeyboardTypePhonePad,
388
+ name_phone_pad: UIKeyboardTypeNamePhonePad,
389
+ name_and_phone: UIKeyboardTypeNamePhonePad,
390
+ email_address: UIKeyboardTypeEmailAddress,
391
+ email: UIKeyboardTypeEmailAddress,
392
+ }
393
+
394
+ @uitextalignment = {
395
+ left: UITextAlignmentLeft,
396
+ right: UITextAlignmentRight,
397
+ center: UITextAlignmentCenter,
398
+ }
399
+
400
+ @uilinebreakmode__deprecated = {
401
+ wordwrap: :word_wrap,
402
+ characterwrap: :character_wrap,
403
+ headtruncation: :head_truncation,
404
+ tailtruncation: :tail_truncation,
405
+ middletruncation: :middle_truncation,
406
+ }
407
+ @uilinebreakmode = {
408
+ word_wrap: UILineBreakModeWordWrap,
409
+ character_wrap: UILineBreakModeCharacterWrap,
410
+ clip: UILineBreakModeClip,
411
+ head_truncation: UILineBreakModeHeadTruncation,
412
+ tail_truncation: UILineBreakModeTailTruncation,
413
+ middle_truncation: UILineBreakModeMiddleTruncation,
414
+ }
415
+
416
+ @uibaselineadjustment = {
417
+ alignbaselines: UIBaselineAdjustmentAlignBaselines,
418
+ aligncenters: UIBaselineAdjustmentAlignCenters,
419
+ none: UIBaselineAdjustmentNone,
420
+ }
421
+
422
+ @uibordertype = {
423
+ none: UITextBorderStyleNone,
424
+ line: UITextBorderStyleLine,
425
+ bezel: UITextBorderStyleBezel,
426
+ rounded: UITextBorderStyleRoundedRect,
427
+ rounded_rect: UITextBorderStyleRoundedRect,
428
+ }
429
+
430
+ @nsdatestyle = {
431
+ no: NSDateFormatterNoStyle,
432
+ none: NSDateFormatterNoStyle,
433
+ short: NSDateFormatterShortStyle,
434
+ medium: NSDateFormatterMediumStyle,
435
+ long: NSDateFormatterLongStyle,
436
+ full: NSDateFormatterFullStyle,
437
+ }
438
+
439
+ @nsnumberstyle__deprecated = {
440
+ spellout: :spell_out,
441
+ }
442
+ @nsnumberstyle = {
443
+ no: NSNumberFormatterNoStyle,
444
+ none: NSNumberFormatterNoStyle,
445
+ decimal: NSNumberFormatterDecimalStyle,
446
+ currency: NSNumberFormatterCurrencyStyle,
447
+ percent: NSNumberFormatterPercentStyle,
448
+ scientific: NSNumberFormatterScientificStyle,
449
+ spell_out: NSNumberFormatterSpellOutStyle,
450
+ }
451
+
452
+ @uistatusbarstyle = {
453
+ default: UIStatusBarStyleDefault,
454
+ black: UIStatusBarStyleBlackOpaque,
455
+ translucent: UIStatusBarStyleBlackTranslucent,
456
+ }
457
+
458
+ @uibarmetrics = {
459
+ default: UIBarMetricsDefault,
460
+ landscape: UIBarMetricsLandscapePhone,
461
+ }
462
+
463
+ @uibarbuttonitem__deprecated = {
464
+ flexiblespace: :flexible_space,
465
+ fixedspace: :fixed_space,
466
+ fastforward: :fast_forward,
467
+ pagecurl: :page_curl,
468
+ }
469
+ @uibarbuttonitem = {
470
+ done: UIBarButtonSystemItemDone,
471
+ cancel: UIBarButtonSystemItemCancel,
472
+ edit: UIBarButtonSystemItemEdit,
473
+ save: UIBarButtonSystemItemSave,
474
+ add: UIBarButtonSystemItemAdd,
475
+ flexible_space: UIBarButtonSystemItemFlexibleSpace,
476
+ fixed_space: UIBarButtonSystemItemFixedSpace,
477
+ compose: UIBarButtonSystemItemCompose,
478
+ reply: UIBarButtonSystemItemReply,
479
+ action: UIBarButtonSystemItemAction,
480
+ organize: UIBarButtonSystemItemOrganize,
481
+ bookmarks: UIBarButtonSystemItemBookmarks,
482
+ search: UIBarButtonSystemItemSearch,
483
+ refresh: UIBarButtonSystemItemRefresh,
484
+ stop: UIBarButtonSystemItemStop,
485
+ camera: UIBarButtonSystemItemCamera,
486
+ trash: UIBarButtonSystemItemTrash,
487
+ play: UIBarButtonSystemItemPlay,
488
+ pause: UIBarButtonSystemItemPause,
489
+ rewind: UIBarButtonSystemItemRewind,
490
+ fast_forward: UIBarButtonSystemItemFastForward,
491
+ undo: UIBarButtonSystemItemUndo,
492
+ redo: UIBarButtonSystemItemRedo,
493
+ page_curl: UIBarButtonSystemItemPageCurl,
494
+ }
495
+
496
+ @uibarbuttonstyle = {
497
+ plain: UIBarButtonItemStylePlain,
498
+ bordered: UIBarButtonItemStyleBordered,
499
+ done: UIBarButtonItemStyleDone
500
+ }
501
+
502
+ @uibuttontype = {
503
+ custom: UIButtonTypeCustom,
504
+ rounded: UIButtonTypeRoundedRect,
505
+ rounded_rect: UIButtonTypeRoundedRect,
506
+ detail: UIButtonTypeDetailDisclosure,
507
+ detail_disclosure: UIButtonTypeDetailDisclosure,
508
+ info: UIButtonTypeInfoLight,
509
+ info_light: UIButtonTypeInfoLight,
510
+ info_dark: UIButtonTypeInfoDark,
511
+ contact: UIButtonTypeContactAdd,
512
+ contact_add: UIButtonTypeContactAdd,
513
+ }
514
+
515
+ @uicontrolstate = {
516
+ normal: UIControlStateNormal,
517
+ highlighted: UIControlStateHighlighted,
518
+ disabled: UIControlStateDisabled,
519
+ selected: UIControlStateSelected,
520
+ application: UIControlStateApplication,
521
+ }
522
+
523
+ @uicontrolevent__deprecated = {
524
+ changed: :change,
525
+ editing_did_endonexit: :editing_did_end_on_exit,
526
+ }
527
+ @uicontrolevent = {
528
+ touch: UIControlEventTouchUpInside,
529
+ touch_up: UIControlEventTouchUpInside,
530
+ touch_down: UIControlEventTouchDown,
531
+ touch_start: UIControlEventTouchDown | UIControlEventTouchDragEnter,
532
+ touch_stop: UIControlEventTouchUpInside | UIControlEventTouchCancel | UIControlEventTouchDragExit,
533
+ change: UIControlEventValueChanged | UIControlEventEditingChanged,
534
+ begin: UIControlEventEditingDidBegin,
535
+ end: UIControlEventEditingDidEnd,
536
+
537
+ touch_down_repeat: UIControlEventTouchDownRepeat,
538
+ touch_drag_inside: UIControlEventTouchDragInside,
539
+ touch_drag_outside: UIControlEventTouchDragOutside,
540
+ touch_drag_enter: UIControlEventTouchDragEnter,
541
+ touch_drag_exit: UIControlEventTouchDragExit,
542
+ touch_up_inside: UIControlEventTouchUpInside,
543
+ touch_up_outside: UIControlEventTouchUpOutside,
544
+ touch_cancel: UIControlEventTouchCancel,
545
+
546
+ value_changed: UIControlEventValueChanged,
547
+
548
+ editing_did_begin: UIControlEventEditingDidBegin,
549
+ # nice. very consistent APPLE:
550
+ editing_changed: UIControlEventEditingChanged,
551
+ # now here's consistency:
552
+ editing_did_change: UIControlEventEditingChanged,
553
+ editing_did_end: UIControlEventEditingDidEnd,
554
+ editing_did_end_on_exit: UIControlEventEditingDidEndOnExit,
555
+
556
+ all_touch: UIControlEventAllTouchEvents,
557
+ all_editing: UIControlEventAllEditingEvents,
558
+ application: UIControlEventApplicationReserved,
559
+ system: UIControlEventSystemReserved,
560
+ all: UIControlEventAllEvents,
561
+ }
562
+
563
+ @uiactivityindicatorstyle__deprecated = {
564
+ whitelarge: :white_large,
565
+ }
566
+ @uiactivityindicatorstyle = {
567
+ large: UIActivityIndicatorViewStyleWhiteLarge,
568
+ white_large: UIActivityIndicatorViewStyleWhiteLarge,
569
+ white: UIActivityIndicatorViewStyleWhite,
570
+ gray: UIActivityIndicatorViewStyleGray,
571
+ }
572
+
573
+ @uisegmentedstyle = {
574
+ plain: UISegmentedControlStylePlain,
575
+ bordered: UISegmentedControlStyleBordered,
576
+ bar: UISegmentedControlStyleBar,
577
+ bezeled: UISegmentedControlStyleBezeled,
578
+ }
579
+
580
+ @uidatepickermode__deprecated = {
581
+ dateandtime: :date_and_time,
582
+ countdowntimer: :count_down_timer,
583
+ }
584
+ @uidatepickermode = {
585
+ time: UIDatePickerModeTime,
586
+ date: UIDatePickerModeDate,
587
+ date_and_time: UIDatePickerModeDateAndTime,
588
+ count_down_timer: UIDatePickerModeCountDownTimer
589
+ }
590
+
591
+ @uicontentmode__deprecated = {
592
+ scaletofill: :scale_to_fill,
593
+ scaleaspectfit: :scale_aspect_fit,
594
+ scaleaspectfill: :scale_aspect_fill,
595
+ topleft: :top_left,
596
+ topright: :top_right,
597
+ bottomleft: :bottom_left,
598
+ bottomright: :bottom_right,
599
+ }
600
+ @uicontentmode = {
601
+ scale: UIViewContentModeScaleToFill,
602
+ scale_to_fill: UIViewContentModeScaleToFill,
603
+ fit: UIViewContentModeScaleAspectFit,
604
+ scale_aspect_fit: UIViewContentModeScaleAspectFit,
605
+ fill: UIViewContentModeScaleAspectFill,
606
+ scale_aspect_fill: UIViewContentModeScaleAspectFill,
607
+ redraw: UIViewContentModeRedraw,
608
+ center: UIViewContentModeCenter,
609
+ top: UIViewContentModeTop,
610
+ bottom: UIViewContentModeBottom,
611
+ left: UIViewContentModeLeft,
612
+ right: UIViewContentModeRight,
613
+ top_left: UIViewContentModeTopLeft,
614
+ top_right: UIViewContentModeTopRight,
615
+ bottom_left: UIViewContentModeBottomLeft,
616
+ bottom_right: UIViewContentModeBottomRight,
617
+ }
618
+
619
+ @uianimationcurve = {
620
+ ease_in_out: UIViewAnimationCurveEaseInOut,
621
+ ease_in: UIViewAnimationCurveEaseIn,
622
+ ease_out: UIViewAnimationCurveEaseOut,
623
+ linear: UIViewAnimationCurveLinear
624
+ }
625
+
626
+ @uitablestyle = {
627
+ plain: UITableViewStylePlain,
628
+ grouped: UITableViewStyleGrouped,
629
+ }
630
+
631
+ @uitablerowanimation = {
632
+ fade: UITableViewRowAnimationFade,
633
+ right: UITableViewRowAnimationRight,
634
+ left: UITableViewRowAnimationLeft,
635
+ top: UITableViewRowAnimationTop,
636
+ bottom: UITableViewRowAnimationBottom,
637
+ none: UITableViewRowAnimationNone,
638
+ middle: UITableViewRowAnimationMiddle,
639
+ automatic: UITableViewRowAnimationAutomatic,
640
+ }
641
+
642
+ @uitablecellstyle = {
643
+ default: UITableViewCellStyleDefault,
644
+ value1: UITableViewCellStyleValue1,
645
+ value2: UITableViewCellStyleValue2,
646
+ subtitle: UITableViewCellStyleSubtitle,
647
+ }
648
+
649
+ @uitablecellaccessorytype__deprecated = {
650
+ disclosureindicator: :disclosure_indicator,
651
+ detaildisclosurebutton: :detail_disclosure_button,
652
+ }
653
+ @uitablecellaccessorytype = {
654
+ none: UITableViewCellAccessoryNone,
655
+ disclosure: UITableViewCellAccessoryDisclosureIndicator,
656
+ disclosure_indicator: UITableViewCellAccessoryDisclosureIndicator,
657
+ detail: UITableViewCellAccessoryDetailDisclosureButton,
658
+ detail_disclosure_button: UITableViewCellAccessoryDetailDisclosureButton,
659
+ checkmark: UITableViewCellAccessoryCheckmark,
660
+ }
661
+
662
+ @uitablecellselectionstyle = {
663
+ none: UITableViewCellSelectionStyleNone,
664
+ blue: UITableViewCellSelectionStyleBlue,
665
+ gray: UITableViewCellSelectionStyleGray,
666
+ }
667
+
668
+ @uitablecellseparatorstyle__deprecated = {
669
+ singleline: :single_line,
670
+ singlelineetched: :single_line_etched,
671
+ }
672
+ @uitablecellseparatorstyle = {
673
+ none: UITableViewCellSeparatorStyleNone,
674
+ single_line: UITableViewCellSeparatorStyleSingleLine,
675
+ single: UITableViewCellSeparatorStyleSingleLine,
676
+ single_line_etched: UITableViewCellSeparatorStyleSingleLineEtched,
677
+ etched: UITableViewCellSeparatorStyleSingleLineEtched,
678
+ }
679
+
680
+ @uialertstyle = {
681
+ default: UIAlertViewStyleDefault,
682
+ secure_text_input: UIAlertViewStyleSecureTextInput,
683
+ plain_text_input: UIAlertViewStylePlainTextInput,
684
+ login_and_password_input: UIAlertViewStyleLoginAndPasswordInput,
685
+ }
686
+
687
+ @uiactionstyle = {
688
+ automatic: UIActionSheetStyleAutomatic,
689
+ default: UIActionSheetStyleDefault,
690
+ black_translucent: UIActionSheetStyleBlackTranslucent,
691
+ black_opaque: UIActionSheetStyleBlackOpaque,
692
+ }
693
+
694
+ @uiimagesource = {
695
+ camera: UIImagePickerControllerSourceTypeCamera,
696
+ library: UIImagePickerControllerSourceTypePhotoLibrary,
697
+ album: UIImagePickerControllerSourceTypeSavedPhotosAlbum,
698
+ }
699
+
700
+ @uiimagecapture = {
701
+ photo: UIImagePickerControllerCameraCaptureModePhoto,
702
+ video: UIImagePickerControllerCameraCaptureModeVideo,
703
+ }
704
+
705
+ @uiimagecamera = {
706
+ front: UIImagePickerControllerCameraDeviceFront,
707
+ rear: UIImagePickerControllerCameraDeviceRear,
708
+ }
709
+
710
+ @uiimagequality = {
711
+ high: UIImagePickerControllerQualityTypeHigh,
712
+ medium: UIImagePickerControllerQualityTypeMedium,
713
+ low: UIImagePickerControllerQualityTypeLow,
714
+ vga: UIImagePickerControllerQualityType640x480,
715
+ i1280x720: UIImagePickerControllerQualityTypeIFrame1280x720,
716
+ i1280: UIImagePickerControllerQualityTypeIFrame1280x720,
717
+ i720: UIImagePickerControllerQualityTypeIFrame1280x720,
718
+ i960x540: UIImagePickerControllerQualityTypeIFrame960x540,
719
+ i960: UIImagePickerControllerQualityTypeIFrame960x540,
720
+ i540: UIImagePickerControllerQualityTypeIFrame960x540,
721
+ }
722
+
723
+ @catimingfunction__deprecated = {
724
+ easein: :ease_in,
725
+ easeout: :ease_out,
726
+ easeinout: :ease_in_out,
727
+ }
728
+ @catimingfunction = {
729
+ linear: KCAMediaTimingFunctionLinear,
730
+ ease_in: KCAMediaTimingFunctionEaseIn,
731
+ ease_out: KCAMediaTimingFunctionEaseOut,
732
+ ease_in_out: KCAMediaTimingFunctionEaseInEaseOut,
733
+ ease_in_ease_out: KCAMediaTimingFunctionEaseInEaseOut,
734
+ default: KCAMediaTimingFunctionDefault,
735
+ }
736
+
737
+ @cglinecap = {
738
+ butt: KCGLineCapButt,
739
+ round: KCGLineCapRound,
740
+ square: KCGLineCapSquare,
741
+ }
742
+
743
+ @cglinejoin = {
744
+ miter: KCGLineJoinMiter,
745
+ round: KCGLineJoinRound,
746
+ bevel: KCGLineJoinBevel,
747
+ }
748
+
749
+ @uigesturerecognizerstate = {
750
+ possible: UIGestureRecognizerStatePossible,
751
+ began: UIGestureRecognizerStateBegan,
752
+ changed: UIGestureRecognizerStateChanged,
753
+ ended: UIGestureRecognizerStateEnded,
754
+ cancelled: UIGestureRecognizerStateCancelled,
755
+ failed: UIGestureRecognizerStateFailed,
756
+ recognized: UIGestureRecognizerStateRecognized,
757
+ }
758
+
759
+ end