Class: Symbol

Inherits:
Object show all
Defined in:
lib/all/sugarcube-unholy/ivar.rb,
lib/ios/sugarcube-color/symbol.rb,
lib/ios/sugarcube-uikit/symbol.rb,
lib/osx/sugarcube-color/symbol.rb,
lib/ios/sugarcube-constants/symbol.rb,
lib/osx/sugarcube-constants/symbol.rb,
lib/cocoa/sugarcube-awesome/awesome_exts.rb

Overview

Adds constant lookups to the Symbol class. These methods are prefixed with ‘ns` to make their intent clear, and to provide a little bit of “namespacing”

# alignment
:left.nsalignment => NSLeftTextAlignment

# nscolors
:black.nscolor => NSColor.blackColor

You can extend the defaults by adding entries:

Symbol.css_colors[:my_color] = 0x123456

:my_color.nscolor => NSColor

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.catimingfunctionObject (readonly)

Returns the value of attribute catimingfunction.



292
293
294
# File 'lib/ios/sugarcube-constants/symbol.rb', line 292

def catimingfunction
  @catimingfunction
end

.catimingfunction__deprecatedObject (readonly)

Returns the value of attribute catimingfunction__deprecated.



293
294
295
# File 'lib/ios/sugarcube-constants/symbol.rb', line 293

def catimingfunction__deprecated
  @catimingfunction__deprecated
end

.cglinecapObject (readonly)

Returns the value of attribute cglinecap.



295
296
297
# File 'lib/ios/sugarcube-constants/symbol.rb', line 295

def cglinecap
  @cglinecap
end

.cglinejoinObject (readonly)

Returns the value of attribute cglinejoin.



296
297
298
# File 'lib/ios/sugarcube-constants/symbol.rb', line 296

def cglinejoin
  @cglinejoin
end

.css_colorsObject (readonly)

Returns the value of attribute css_colors.



5
6
7
# File 'lib/ios/sugarcube-color/symbol.rb', line 5

def css_colors
  @css_colors
end

.css_colors_cacheObject (readonly)

Returns the value of attribute css_colors_cache.



6
7
8
# File 'lib/ios/sugarcube-color/symbol.rb', line 6

def css_colors_cache
  @css_colors_cache
end

.nsautoresizingmaskObject (readonly)

Returns the value of attribute nsautoresizingmask.



67
68
69
# File 'lib/osx/sugarcube-constants/symbol.rb', line 67

def nsautoresizingmask
  @nsautoresizingmask
end

.nsbezelstyleObject (readonly)

Returns the value of attribute nsbezelstyle.



72
73
74
# File 'lib/osx/sugarcube-constants/symbol.rb', line 72

def nsbezelstyle
  @nsbezelstyle
end

.nsbuttontypeObject (readonly)

Returns the value of attribute nsbuttontype.



71
72
73
# File 'lib/osx/sugarcube-constants/symbol.rb', line 71

def nsbuttontype
  @nsbuttontype
end

.nscolorsObject (readonly)

Returns the value of attribute nscolors.



3
4
5
# File 'lib/osx/sugarcube-color/symbol.rb', line 3

def nscolors
  @nscolors
end

.nsdatestyleObject (readonly)

Returns the value of attribute nsdatestyle.



250
251
252
# File 'lib/ios/sugarcube-constants/symbol.rb', line 250

def nsdatestyle
  @nsdatestyle
end

.nsfocusringtypeObject (readonly)

Returns the value of attribute nsfocusringtype.



73
74
75
# File 'lib/osx/sugarcube-constants/symbol.rb', line 73

def nsfocusringtype
  @nsfocusringtype
end

.nsnumberstyleObject (readonly)

Returns the value of attribute nsnumberstyle.



251
252
253
# File 'lib/ios/sugarcube-constants/symbol.rb', line 251

def nsnumberstyle
  @nsnumberstyle
end

.nsnumberstyle__deprecatedObject (readonly)

Returns the value of attribute nsnumberstyle__deprecated.



252
253
254
# File 'lib/ios/sugarcube-constants/symbol.rb', line 252

def nsnumberstyle__deprecated
  @nsnumberstyle__deprecated
end

.nstextalignmentObject (readonly)

Returns the value of attribute nstextalignment.



244
245
246
# File 'lib/ios/sugarcube-constants/symbol.rb', line 244

def nstextalignment
  @nstextalignment
end

.uiactionstyleObject (readonly)

Returns the value of attribute uiactionstyle.



285
286
287
# File 'lib/ios/sugarcube-constants/symbol.rb', line 285

def uiactionstyle
  @uiactionstyle
end

.uiactivityindicatorstyleObject (readonly)

Returns the value of attribute uiactivityindicatorstyle.



265
266
267
# File 'lib/ios/sugarcube-constants/symbol.rb', line 265

def uiactivityindicatorstyle
  @uiactivityindicatorstyle
end

.uiactivityindicatorstyle__deprecatedObject (readonly)

Returns the value of attribute uiactivityindicatorstyle__deprecated.



266
267
268
# File 'lib/ios/sugarcube-constants/symbol.rb', line 266

def uiactivityindicatorstyle__deprecated
  @uiactivityindicatorstyle__deprecated
end

.uialertstyleObject (readonly)

Returns the value of attribute uialertstyle.



284
285
286
# File 'lib/ios/sugarcube-constants/symbol.rb', line 284

def uialertstyle
  @uialertstyle
end

.uianimationcurveObject (readonly)

Returns the value of attribute uianimationcurve.



272
273
274
# File 'lib/ios/sugarcube-constants/symbol.rb', line 272

def uianimationcurve
  @uianimationcurve
end

.uianimationoptionObject (readonly)

Returns the value of attribute uianimationoption.



273
274
275
# File 'lib/ios/sugarcube-constants/symbol.rb', line 273

def uianimationoption
  @uianimationoption
end

.uiautoresizemaskObject (readonly)

Returns the value of attribute uiautoresizemask.



236
237
238
# File 'lib/ios/sugarcube-constants/symbol.rb', line 236

def uiautoresizemask
  @uiautoresizemask
end

.uiautoresizemask__deprecatedObject (readonly)

Returns the value of attribute uiautoresizemask__deprecated.



237
238
239
# File 'lib/ios/sugarcube-constants/symbol.rb', line 237

def uiautoresizemask__deprecated
  @uiautoresizemask__deprecated
end

.uibarbuttonitemObject (readonly)

Returns the value of attribute uibarbuttonitem.



256
257
258
# File 'lib/ios/sugarcube-constants/symbol.rb', line 256

def uibarbuttonitem
  @uibarbuttonitem
end

.uibarbuttonitem__deprecatedObject (readonly)

Returns the value of attribute uibarbuttonitem__deprecated.



257
258
259
# File 'lib/ios/sugarcube-constants/symbol.rb', line 257

def uibarbuttonitem__deprecated
  @uibarbuttonitem__deprecated
end

.uibarbuttonstyleObject (readonly)

Returns the value of attribute uibarbuttonstyle.



258
259
260
# File 'lib/ios/sugarcube-constants/symbol.rb', line 258

def uibarbuttonstyle
  @uibarbuttonstyle
end

.uibarmetricsObject (readonly)

Returns the value of attribute uibarmetrics.



255
256
257
# File 'lib/ios/sugarcube-constants/symbol.rb', line 255

def uibarmetrics
  @uibarmetrics
end

.uibaselineadjustmentObject (readonly)

Returns the value of attribute uibaselineadjustment.



248
249
250
# File 'lib/ios/sugarcube-constants/symbol.rb', line 248

def uibaselineadjustment
  @uibaselineadjustment
end

.uibaselineadjustment__deprecatedObject (readonly)

Returns the value of attribute uibaselineadjustment__deprecated.



247
248
249
# File 'lib/ios/sugarcube-constants/symbol.rb', line 247

def uibaselineadjustment__deprecated
  @uibaselineadjustment__deprecated
end

.uibordertypeObject (readonly)

Returns the value of attribute uibordertype.



249
250
251
# File 'lib/ios/sugarcube-constants/symbol.rb', line 249

def uibordertype
  @uibordertype
end

.uibuttontypeObject (readonly)

Returns the value of attribute uibuttontype.



261
262
263
# File 'lib/ios/sugarcube-constants/symbol.rb', line 261

def uibuttontype
  @uibuttontype
end

.uicolorsObject (readonly)

Returns the value of attribute uicolors.



3
4
5
# File 'lib/ios/sugarcube-color/symbol.rb', line 3

def uicolors
  @uicolors
end

.uicolors__deprecatedObject (readonly)

Returns the value of attribute uicolors__deprecated.



4
5
6
# File 'lib/ios/sugarcube-color/symbol.rb', line 4

def uicolors__deprecated
  @uicolors__deprecated
end

.uicontentmodeObject (readonly)

Returns the value of attribute uicontentmode.



270
271
272
# File 'lib/ios/sugarcube-constants/symbol.rb', line 270

def uicontentmode
  @uicontentmode
end

.uicontentmode__deprecatedObject (readonly)

Returns the value of attribute uicontentmode__deprecated.



271
272
273
# File 'lib/ios/sugarcube-constants/symbol.rb', line 271

def uicontentmode__deprecated
  @uicontentmode__deprecated
end

.uicontroleventObject (readonly)

Returns the value of attribute uicontrolevent.



263
264
265
# File 'lib/ios/sugarcube-constants/symbol.rb', line 263

def uicontrolevent
  @uicontrolevent
end

.uicontrolevent__deprecatedObject (readonly)

Returns the value of attribute uicontrolevent__deprecated.



264
265
266
# File 'lib/ios/sugarcube-constants/symbol.rb', line 264

def uicontrolevent__deprecated
  @uicontrolevent__deprecated
end

.uicontrolstateObject (readonly)

Returns the value of attribute uicontrolstate.



262
263
264
# File 'lib/ios/sugarcube-constants/symbol.rb', line 262

def uicontrolstate
  @uicontrolstate
end

.uidatepickermodeObject (readonly)

Returns the value of attribute uidatepickermode.



268
269
270
# File 'lib/ios/sugarcube-constants/symbol.rb', line 268

def uidatepickermode
  @uidatepickermode
end

.uidatepickermode__deprecatedObject (readonly)

Returns the value of attribute uidatepickermode__deprecated.



269
270
271
# File 'lib/ios/sugarcube-constants/symbol.rb', line 269

def uidatepickermode__deprecated
  @uidatepickermode__deprecated
end

.uideviceObject (readonly)

Returns the value of attribute uidevice.



232
233
234
# File 'lib/ios/sugarcube-constants/symbol.rb', line 232

def uidevice
  @uidevice
end

.uideviceorientationObject (readonly)

Returns the value of attribute uideviceorientation.



233
234
235
# File 'lib/ios/sugarcube-constants/symbol.rb', line 233

def uideviceorientation
  @uideviceorientation
end

.uifontObject (readonly)

Returns the value of attribute uifont.



48
49
50
# File 'lib/ios/sugarcube-uikit/symbol.rb', line 48

def uifont
  @uifont
end

.uifontsizeObject (readonly)

Returns the value of attribute uifontsize.



49
50
51
# File 'lib/ios/sugarcube-uikit/symbol.rb', line 49

def uifontsize
  @uifontsize
end

.uigesturerecognizerstateObject (readonly)

Returns the value of attribute uigesturerecognizerstate.



298
299
300
# File 'lib/ios/sugarcube-constants/symbol.rb', line 298

def uigesturerecognizerstate
  @uigesturerecognizerstate
end

.uiimagecameraObject (readonly)

Returns the value of attribute uiimagecamera.



289
290
291
# File 'lib/ios/sugarcube-constants/symbol.rb', line 289

def uiimagecamera
  @uiimagecamera
end

.uiimagecaptureObject (readonly)

Returns the value of attribute uiimagecapture.



288
289
290
# File 'lib/ios/sugarcube-constants/symbol.rb', line 288

def uiimagecapture
  @uiimagecapture
end

.uiimagequalityObject (readonly)

Returns the value of attribute uiimagequality.



290
291
292
# File 'lib/ios/sugarcube-constants/symbol.rb', line 290

def uiimagequality
  @uiimagequality
end

.uiimagesourceObject (readonly)

Returns the value of attribute uiimagesource.



287
288
289
# File 'lib/ios/sugarcube-constants/symbol.rb', line 287

def uiimagesource
  @uiimagesource
end

.uiinterfacemaskObject (readonly)

Returns the value of attribute uiinterfacemask.



235
236
237
# File 'lib/ios/sugarcube-constants/symbol.rb', line 235

def uiinterfacemask
  @uiinterfacemask
end

.uiinterfaceorientationObject (readonly)

Returns the value of attribute uiinterfaceorientation.



234
235
236
# File 'lib/ios/sugarcube-constants/symbol.rb', line 234

def uiinterfaceorientation
  @uiinterfaceorientation
end

.uikeyboardtypeObject (readonly)

Returns the value of attribute uikeyboardtype.



241
242
243
# File 'lib/ios/sugarcube-constants/symbol.rb', line 241

def uikeyboardtype
  @uikeyboardtype
end

.uikeyboardtype__deprecatedObject (readonly)

Returns the value of attribute uikeyboardtype__deprecated.



242
243
244
# File 'lib/ios/sugarcube-constants/symbol.rb', line 242

def uikeyboardtype__deprecated
  @uikeyboardtype__deprecated
end

.uilinebreakmodeObject (readonly)

Returns the value of attribute uilinebreakmode.



245
246
247
# File 'lib/ios/sugarcube-constants/symbol.rb', line 245

def uilinebreakmode
  @uilinebreakmode
end

.uilinebreakmode__deprecatedObject (readonly)

Returns the value of attribute uilinebreakmode__deprecated.



246
247
248
# File 'lib/ios/sugarcube-constants/symbol.rb', line 246

def uilinebreakmode__deprecated
  @uilinebreakmode__deprecated
end

.uireturnkeyObject (readonly)

Returns the value of attribute uireturnkey.



239
240
241
# File 'lib/ios/sugarcube-constants/symbol.rb', line 239

def uireturnkey
  @uireturnkey
end

.uireturnkey__deprecatedObject (readonly)

Returns the value of attribute uireturnkey__deprecated.



240
241
242
# File 'lib/ios/sugarcube-constants/symbol.rb', line 240

def uireturnkey__deprecated
  @uireturnkey__deprecated
end

.uisegmentedstyleObject (readonly)

Returns the value of attribute uisegmentedstyle.



267
268
269
# File 'lib/ios/sugarcube-constants/symbol.rb', line 267

def uisegmentedstyle
  @uisegmentedstyle
end

.uistatusbarstyleObject (readonly)

Returns the value of attribute uistatusbarstyle.



254
255
256
# File 'lib/ios/sugarcube-constants/symbol.rb', line 254

def uistatusbarstyle
  @uistatusbarstyle
end

.uitabbarsystemitemObject (readonly)

Returns the value of attribute uitabbarsystemitem.



259
260
261
# File 'lib/ios/sugarcube-constants/symbol.rb', line 259

def uitabbarsystemitem
  @uitabbarsystemitem
end

.uitablecellaccessorytypeObject (readonly)

Returns the value of attribute uitablecellaccessorytype.



278
279
280
# File 'lib/ios/sugarcube-constants/symbol.rb', line 278

def uitablecellaccessorytype
  @uitablecellaccessorytype
end

.uitablecellaccessorytype__deprecatedObject (readonly)

Returns the value of attribute uitablecellaccessorytype__deprecated.



279
280
281
# File 'lib/ios/sugarcube-constants/symbol.rb', line 279

def uitablecellaccessorytype__deprecated
  @uitablecellaccessorytype__deprecated
end

.uitablecellselectionstyleObject (readonly)

Returns the value of attribute uitablecellselectionstyle.



280
281
282
# File 'lib/ios/sugarcube-constants/symbol.rb', line 280

def uitablecellselectionstyle
  @uitablecellselectionstyle
end

.uitablecellseparatorstyleObject (readonly)

Returns the value of attribute uitablecellseparatorstyle.



281
282
283
# File 'lib/ios/sugarcube-constants/symbol.rb', line 281

def uitablecellseparatorstyle
  @uitablecellseparatorstyle
end

.uitablecellseparatorstyle__deprecatedObject (readonly)

Returns the value of attribute uitablecellseparatorstyle__deprecated.



282
283
284
# File 'lib/ios/sugarcube-constants/symbol.rb', line 282

def uitablecellseparatorstyle__deprecated
  @uitablecellseparatorstyle__deprecated
end

.uitablecellstyleObject (readonly)

Returns the value of attribute uitablecellstyle.



277
278
279
# File 'lib/ios/sugarcube-constants/symbol.rb', line 277

def uitablecellstyle
  @uitablecellstyle
end

.uitablerowanimationObject (readonly)

Returns the value of attribute uitablerowanimation.



276
277
278
# File 'lib/ios/sugarcube-constants/symbol.rb', line 276

def uitablerowanimation
  @uitablerowanimation
end

.uitablestyleObject (readonly)

Returns the value of attribute uitablestyle.



275
276
277
# File 'lib/ios/sugarcube-constants/symbol.rb', line 275

def uitablestyle
  @uitablestyle
end

.uitextalignmentObject (readonly)

Returns the value of attribute uitextalignment.



243
244
245
# File 'lib/ios/sugarcube-constants/symbol.rb', line 243

def uitextalignment
  @uitextalignment
end

Instance Method Details

#awesome_icon(options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/cocoa/sugarcube-awesome/awesome_exts.rb', line 3

def awesome_icon(options={})
  raise "the MotionAwesome gem is required to use sugarcube-awesome" unless defined? MotionAwesome
  text = MotionAwesome.hex_for_icon( MotionAwesome.xform_icon(self) )

  if options.key?(:size)
    font_size = options[:size]
    font_size = font_size.uifontsize if font_size.respond_to?(:uifontsize)
  else
    font_size = UIFont.systemFontSize
  end

  awesome_attrs = {NSFontAttributeName => MotionAwesome.font(font_size)}
  if options.key?(:color)
    awesome_attrs[NSForegroundColorAttributeName] = options[:color].uicolor
  end

  NSAttributedString.alloc.initWithString(text, attributes: awesome_attrs )
end

#catimingfunctionObject Also known as: catiming



211
212
213
# File 'lib/ios/sugarcube-constants/symbol.rb', line 211

def catimingfunction
  SugarCube.look_in(self, Symbol.catimingfunction, Symbol.catimingfunction__deprecated)
end

#cgcolor(alpha = nil) ⇒ Object



36
37
38
# File 'lib/ios/sugarcube-color/symbol.rb', line 36

def cgcolor(alpha=nil)
  uicolor(alpha).CGColor
end

#cglinecapObject Also known as: cglinecapstyle



216
217
218
# File 'lib/ios/sugarcube-constants/symbol.rb', line 216

def cglinecap
  SugarCube.look_in(self, Symbol.cglinecap)
end

#cglinejoinObject Also known as: cglinejoinstyle



221
222
223
# File 'lib/ios/sugarcube-constants/symbol.rb', line 221

def cglinejoin
  SugarCube.look_in(self, Symbol.cglinejoin)
end

#cvarObject



12
13
14
# File 'lib/all/sugarcube-unholy/ivar.rb', line 12

def cvar
  self.to_s.cvar
end

#ivarObject



4
5
6
# File 'lib/all/sugarcube-unholy/ivar.rb', line 4

def ivar
  self.to_s.ivar
end

#nsautoresizingmaskObject Also known as: nsautoresizemask



19
20
21
# File 'lib/osx/sugarcube-constants/symbol.rb', line 19

def nsautoresizingmask
  SugarCube.look_in(self, Symbol.nsautoresizingmask)
end

#nsbezelstyleObject



43
44
45
# File 'lib/osx/sugarcube-constants/symbol.rb', line 43

def nsbezelstyle
  SugarCube.look_in(self, Symbol.nsbezelstyle)
end

#nsbuttontypeObject



39
40
41
# File 'lib/osx/sugarcube-constants/symbol.rb', line 39

def nsbuttontype
  SugarCube.look_in(self, Symbol.nsbuttontype)
end

#nscolor(alpha = nil) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/osx/sugarcube-color/symbol.rb', line 8

def nscolor(alpha=nil)
  if Symbol.css_colors_cache.has_key? self
    color = Symbol.css_colors_cache[self]
  elsif Symbol.nscolors.has_key? self
    # system colors
    color = NSColor.send(SugarCube.look_in(self, Symbol.nscolors))
  else
    # css colors
    color = SugarCube.look_in(self, Symbol.css_colors).nscolor
    Symbol.css_colors_cache[self] = color
  end

  if alpha
    color = color.colorWithAlphaComponent(alpha.to_f)
  end

  color
end

#nsdatestyleObject Also known as: nsdateformatterstyle



76
77
78
# File 'lib/ios/sugarcube-constants/symbol.rb', line 76

def nsdatestyle
  SugarCube.look_in(self, Symbol.nsdatestyle)
end

#nsfocusringtypeObject



47
48
49
# File 'lib/osx/sugarcube-constants/symbol.rb', line 47

def nsfocusringtype
  SugarCube.look_in(self, Symbol.nsfocusringtype)
end

#nsnumberstyleObject Also known as: nsnumberformatterstyle



81
82
83
# File 'lib/ios/sugarcube-constants/symbol.rb', line 81

def nsnumberstyle
  SugarCube.look_in(self, Symbol.nsnumberstyle, Symbol.nsnumberstyle__deprecated)
end

#nstextalignmentObject Also known as: nsalignment



57
58
59
# File 'lib/ios/sugarcube-constants/symbol.rb', line 57

def nstextalignment
  SugarCube.look_in(self, Symbol.nstextalignment)
end

#setterObject



8
9
10
# File 'lib/all/sugarcube-unholy/ivar.rb', line 8

def setter
  self.to_s.setter
end

#skcolor(alpha = nil) ⇒ Object



40
41
42
# File 'lib/ios/sugarcube-color/symbol.rb', line 40

def skcolor(alpha=nil)
  uicolor(alpha)
end

#uiactionstyleObject Also known as: uiactionsheetstyle



185
186
187
# File 'lib/ios/sugarcube-constants/symbol.rb', line 185

def uiactionstyle
  SugarCube.look_in(self, Symbol.uiactionstyle)
end

#uiactivityindicatorstyleObject Also known as: uiactivityindicatorviewstyle



121
122
123
# File 'lib/ios/sugarcube-constants/symbol.rb', line 121

def uiactivityindicatorstyle
  SugarCube.look_in(self, Symbol.uiactivityindicatorstyle, Symbol.uiactivityindicatorstyle__deprecated)
end

#uialertstyleObject Also known as: uialertviewstyle



180
181
182
# File 'lib/ios/sugarcube-constants/symbol.rb', line 180

def uialertstyle
  SugarCube.look_in(self, Symbol.uialertstyle)
end

#uianimationcurveObject Also known as: uiviewanimationcurve



140
141
142
# File 'lib/ios/sugarcube-constants/symbol.rb', line 140

def uianimationcurve
  SugarCube.look_in(self, Symbol.uianimationcurve)
end

#uianimationoptionObject Also known as: uiviewanimationoption



145
146
147
# File 'lib/ios/sugarcube-constants/symbol.rb', line 145

def uianimationoption
  SugarCube.look_in(self, Symbol.uianimationoption)
end

#uiautoresizemaskObject Also known as: uiviewautoresizing, uiautoresizingmask, uiautoresize



36
37
38
# File 'lib/ios/sugarcube-constants/symbol.rb', line 36

def uiautoresizemask
  SugarCube.look_in(self, Symbol.uiautoresizemask, Symbol.uiautoresizemask__deprecated)
end

#uibarbuttonitemObject



94
95
96
# File 'lib/ios/sugarcube-constants/symbol.rb', line 94

def uibarbuttonitem
  SugarCube.look_in(self, Symbol.uibarbuttonitem, Symbol.uibarbuttonitem__deprecated)
end

#uibarbuttonstyleObject



98
99
100
# File 'lib/ios/sugarcube-constants/symbol.rb', line 98

def uibarbuttonstyle
  SugarCube.look_in(self, Symbol.uibarbuttonstyle)
end

#uibarmetricsObject



90
91
92
# File 'lib/ios/sugarcube-constants/symbol.rb', line 90

def uibarmetrics
  SugarCube.look_in(self, Symbol.uibarmetrics)
end

#uibaselineadjustmentObject Also known as: uibaseline



66
67
68
# File 'lib/ios/sugarcube-constants/symbol.rb', line 66

def uibaselineadjustment
  SugarCube.look_in(self, Symbol.uibaselineadjustment, Symbol.uibaselineadjustment__deprecated)
end

#uibordertypeObject Also known as: uiborderstyle



71
72
73
# File 'lib/ios/sugarcube-constants/symbol.rb', line 71

def uibordertype
  SugarCube.look_in(self, Symbol.uibordertype)
end

#uibuttontypeObject



107
108
109
# File 'lib/ios/sugarcube-constants/symbol.rb', line 107

def uibuttontype
  SugarCube.look_in(self, Symbol.uibuttontype)
end

#uicolor(alpha = nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/ios/sugarcube-color/symbol.rb', line 9

def uicolor(alpha=nil)
  if Symbol.uicolors.has_key?(self) || Symbol.uicolors__deprecated.has_key?(self)
    # iOS colors
    color = UIColor.send(SugarCube.look_in(self, Symbol.uicolors, Symbol.uicolors__deprecated))

    if alpha
      color = color.colorWithAlphaComponent(alpha.to_f)
    end
  elsif Symbol.css_colors_cache.has_key? self
    color = Symbol.css_colors_cache[self]
  elsif Symbol.uicolors.has_key? self
    # system colors
    color = UIColor.send(SugarCube.look_in(self, Symbol.uicolors, Symbol.uicolors__deprecated))
    Symbol.css_colors_cache[self] = color
  else
    # css colors
    color = SugarCube.look_in(self, Symbol.css_colors).uicolor
    Symbol.css_colors_cache[self] = color
  end

  if alpha
    color = color.colorWithAlphaComponent(alpha.to_f)
  end

  color
end

#uicontentmodeObject Also known as: uiviewcontentmode



135
136
137
# File 'lib/ios/sugarcube-constants/symbol.rb', line 135

def uicontentmode
  SugarCube.look_in(self, Symbol.uicontentmode, Symbol.uicontentmode__deprecated)
end

#uicontroleventObject



117
118
119
# File 'lib/ios/sugarcube-constants/symbol.rb', line 117

def uicontrolevent
  SugarCube.look_in(self, Symbol.uicontrolevent, Symbol.uicontrolevent__deprecated)
end

#uicontrolstateObject Also known as: uistate



111
112
113
# File 'lib/ios/sugarcube-constants/symbol.rb', line 111

def uicontrolstate
  SugarCube.look_in(self, Symbol.uicontrolstate)
end

#uidatepickermodeObject



131
132
133
# File 'lib/ios/sugarcube-constants/symbol.rb', line 131

def uidatepickermode
  SugarCube.look_in(self, Symbol.uidatepickermode, Symbol.uidatepickermode__deprecated)
end

#uideviceObject



19
20
21
# File 'lib/ios/sugarcube-constants/symbol.rb', line 19

def uidevice
  SugarCube.look_in(self, Symbol.uidevice)
end

#uideviceorientationObject



23
24
25
# File 'lib/ios/sugarcube-constants/symbol.rb', line 23

def uideviceorientation
  SugarCube.look_in(self, Symbol.uideviceorientation)
end

#uifont(size = nil) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/ios/sugarcube-uikit/symbol.rb', line 17

def uifont(size=nil)
  size ||= UIFont.systemFontSize
  # system fonts
  if Symbol.uifont.has_key? self
    font = SugarCube.look_in(self, Symbol.uifont)
    if size.is_a?(Symbol)
      size = size.uifontsize
    end

    if font.is_a?(Symbol)
      return UIFont.send(font, size)
    else
      return font.uifont(size)
    end
  else
    if size.is_a?(Symbol)
        size = size.uifontsize
    end
    return UIFont.systemFontOfSize(size)
  end
end

#uifontsizeObject



39
40
41
42
43
44
45
# File 'lib/ios/sugarcube-uikit/symbol.rb', line 39

def uifontsize
  size = SugarCube.look_in(self, Symbol.uifontsize)
  if size.is_a?(Symbol)
    return UIFont.send(size)
  end
  return size.to_f
end

#uigesturerecognizerstateObject Also known as: uigesturestate



226
227
228
# File 'lib/ios/sugarcube-constants/symbol.rb', line 226

def uigesturerecognizerstate
  SugarCube.look_in(self, Symbol.uigesturerecognizerstate)
end

#uiimagecameraObject Also known as: uiimagecameradevice, uiimagedevice



200
201
202
# File 'lib/ios/sugarcube-constants/symbol.rb', line 200

def uiimagecamera
  SugarCube.look_in(self, Symbol.uiimagecamera)
end

#uiimagecaptureObject Also known as: uiimagecapturemode



195
196
197
# File 'lib/ios/sugarcube-constants/symbol.rb', line 195

def uiimagecapture
  SugarCube.look_in(self, Symbol.uiimagecapture)
end

#uiimagequalityObject Also known as: uiimagequalitytype



206
207
208
# File 'lib/ios/sugarcube-constants/symbol.rb', line 206

def uiimagequality
  SugarCube.look_in(self, Symbol.uiimagequality)
end

#uiimagesourceObject Also known as: uiimagesourcetype



190
191
192
# File 'lib/ios/sugarcube-constants/symbol.rb', line 190

def uiimagesource
  SugarCube.look_in(self, Symbol.uiimagesource)
end

#uiinterfacemaskObject



32
33
34
# File 'lib/ios/sugarcube-constants/symbol.rb', line 32

def uiinterfacemask
  SugarCube.look_in(self, Symbol.uiinterfacemask)
end

#uiinterfaceorientationObject Also known as: uiorientation



27
28
29
# File 'lib/ios/sugarcube-constants/symbol.rb', line 27

def uiinterfaceorientation
  SugarCube.look_in(self, Symbol.uiinterfaceorientation)
end

#uikeyboardtypeObject



47
48
49
# File 'lib/ios/sugarcube-constants/symbol.rb', line 47

def uikeyboardtype
  SugarCube.look_in(self, Symbol.uikeyboardtype, Symbol.uikeyboardtype__deprecated)
end

#uilinebreakmodeObject



62
63
64
# File 'lib/ios/sugarcube-constants/symbol.rb', line 62

def uilinebreakmode
  SugarCube.look_in(self, Symbol.uilinebreakmode, Symbol.uilinebreakmode__deprecated)
end

#uireturnkeyObject



43
44
45
# File 'lib/ios/sugarcube-constants/symbol.rb', line 43

def uireturnkey
  SugarCube.look_in(self, Symbol.uireturnkey, Symbol.uireturnkey__deprecated)
end

#uisegmentedstyleObject Also known as: uisegmentedcontrolstyle



126
127
128
# File 'lib/ios/sugarcube-constants/symbol.rb', line 126

def uisegmentedstyle
  SugarCube.look_in(self, Symbol.uisegmentedstyle)
end

#uistatusbarstyleObject



86
87
88
# File 'lib/ios/sugarcube-constants/symbol.rb', line 86

def uistatusbarstyle
  SugarCube.look_in(self, Symbol.uistatusbarstyle)
end

#uitabbarsystemitemObject Also known as: uitabbaritem



102
103
104
# File 'lib/ios/sugarcube-constants/symbol.rb', line 102

def uitabbarsystemitem
  SugarCube.look_in(self, Symbol.uitabbarsystemitem)
end

#uitablecellaccessorytypeObject Also known as: uitablecellaccessory, uitableviewcellaccessorytype



165
166
167
# File 'lib/ios/sugarcube-constants/symbol.rb', line 165

def uitablecellaccessorytype
  SugarCube.look_in(self, Symbol.uitablecellaccessorytype, Symbol.uitablecellaccessorytype__deprecated)
end

#uitablecellselectionstyleObject Also known as: uitableviewcellselectionstyle



171
172
173
# File 'lib/ios/sugarcube-constants/symbol.rb', line 171

def uitablecellselectionstyle
  SugarCube.look_in(self, Symbol.uitablecellselectionstyle)
end

#uitablecellseparatorstyleObject



176
177
178
# File 'lib/ios/sugarcube-constants/symbol.rb', line 176

def uitablecellseparatorstyle
  SugarCube.look_in(self, Symbol.uitablecellseparatorstyle, Symbol.uitablecellseparatorstyle__deprecated)
end

#uitablecellstyleObject Also known as: uitableviewcellstyle



160
161
162
# File 'lib/ios/sugarcube-constants/symbol.rb', line 160

def uitablecellstyle
  SugarCube.look_in(self, Symbol.uitablecellstyle)
end

#uitablerowanimationObject Also known as: uitableviewrowanimation



155
156
157
# File 'lib/ios/sugarcube-constants/symbol.rb', line 155

def uitablerowanimation
  SugarCube.look_in(self, Symbol.uitablerowanimation)
end

#uitablestyleObject Also known as: uitableviewstyle



150
151
152
# File 'lib/ios/sugarcube-constants/symbol.rb', line 150

def uitablestyle
  SugarCube.look_in(self, Symbol.uitablestyle)
end

#uitextalignmentObject Also known as: uialignment



51
52
53
54
# File 'lib/ios/sugarcube-constants/symbol.rb', line 51

def uitextalignment
  SugarCube.log('uitextalignment is deprecated.  Use nstextalignment instead.')
  SugarCube.look_in(self, Symbol.nstextalignment)
end