Class: Symbol
- Defined in:
- lib/sugarcube/symbol.rb,
lib/sugarcube-unholy/ivar.rb,
lib/sugarcube/symbol/symbol_uicolor.rb
Overview
Some Symbol additions to make my life easier
Class Attribute Summary collapse
-
.activityindicator_styles ⇒ Object
Returns the value of attribute activityindicator_styles.
-
.autoresizemasks ⇒ Object
Returns the value of attribute autoresizemasks.
-
.barbuttomitems ⇒ Object
Returns the value of attribute barbuttomitems.
-
.barmetrics ⇒ Object
Returns the value of attribute barmetrics.
-
.baselineadjustments ⇒ Object
Returns the value of attribute baselineadjustments.
-
.border_types ⇒ Object
Returns the value of attribute border_types.
-
.buttontypes ⇒ Object
Returns the value of attribute buttontypes.
-
.ca_timingfunctions ⇒ Object
Returns the value of attribute ca_timingfunctions.
-
.cg_linecapstyles ⇒ Object
Returns the value of attribute cg_linecapstyles.
-
.cg_linejoinstyles ⇒ Object
Returns the value of attribute cg_linejoinstyles.
-
.content_modes ⇒ Object
Returns the value of attribute content_modes.
-
.control_events ⇒ Object
Returns the value of attribute control_events.
-
.control_states ⇒ Object
Returns the value of attribute control_states.
-
.css_colors ⇒ Object
Returns the value of attribute css_colors.
-
.date_styles ⇒ Object
Returns the value of attribute date_styles.
-
.datepicker_modes ⇒ Object
Returns the value of attribute datepicker_modes.
-
.device_orientations ⇒ Object
Returns the value of attribute device_orientations.
-
.devices ⇒ Object
Returns the value of attribute devices.
-
.font_sizes ⇒ Object
Returns the value of attribute font_sizes.
-
.gesture_recognizer_states ⇒ Object
Returns the value of attribute gesture_recognizer_states.
-
.image_cameradevice ⇒ Object
Returns the value of attribute image_cameradevice.
-
.image_capturemode ⇒ Object
Returns the value of attribute image_capturemode.
-
.image_quality ⇒ Object
Returns the value of attribute image_quality.
-
.image_sourcetypes ⇒ Object
Returns the value of attribute image_sourcetypes.
-
.interface_masks ⇒ Object
Returns the value of attribute interface_masks.
-
.interface_orientations ⇒ Object
Returns the value of attribute interface_orientations.
-
.keyboardtypes ⇒ Object
Returns the value of attribute keyboardtypes.
-
.linebreakmodes ⇒ Object
Returns the value of attribute linebreakmodes.
-
.number_styles ⇒ Object
Returns the value of attribute number_styles.
-
.orientations ⇒ Object
Returns the value of attribute orientations.
-
.returnkeys ⇒ Object
Returns the value of attribute returnkeys.
-
.segmented_styles ⇒ Object
Returns the value of attribute segmented_styles.
-
.statusbar_styles ⇒ Object
Returns the value of attribute statusbar_styles.
-
.system_fonts ⇒ Object
Returns the value of attribute system_fonts.
-
.tableview_cellaccessorytype ⇒ Object
Returns the value of attribute tableview_cellaccessorytype.
-
.tableview_cellselectionstyle ⇒ Object
Returns the value of attribute tableview_cellselectionstyle.
-
.tableview_cellseparatorstyle ⇒ Object
Returns the value of attribute tableview_cellseparatorstyle.
-
.tableview_cellstyles ⇒ Object
Returns the value of attribute tableview_cellstyles.
-
.tableview_rowanimation ⇒ Object
Returns the value of attribute tableview_rowanimation.
-
.tableview_styles ⇒ Object
Returns the value of attribute tableview_styles.
-
.textalignments ⇒ Object
Returns the value of attribute textalignments.
-
.uicolors ⇒ Object
Returns the value of attribute uicolors.
Instance Method Summary collapse
- #catimingfunction ⇒ Object (also: #catiming)
- #cglinecap ⇒ Object (also: #cglinecapstyle)
- #cglinejoin ⇒ Object (also: #cglinejoinstyle)
- #cvar ⇒ Object
- #ivar ⇒ Object
- #nsdatestyle ⇒ Object (also: #nsdateformatterstyle)
- #nsnumberstyle ⇒ Object (also: #nsnumberformatterstyle)
- #uiactivityindicatorstyle ⇒ Object (also: #uiactivityindicatorviewstyle)
- #uiautoresizemask ⇒ Object (also: #uiviewautoresizing, #uiautoresizingmask, #uiautoresize)
- #uibarbuttonitem ⇒ Object
- #uibarmetrics ⇒ Object
- #uibaselineadjustment ⇒ Object (also: #uibaseline)
- #uibordertype ⇒ Object (also: #uiborderstyle)
- #uibuttontype ⇒ Object
- #uicolor(alpha = nil) ⇒ Object
- #uicontentmode ⇒ Object (also: #uiviewcontentmode)
- #uicontrolevent ⇒ Object
- #uicontrolstate ⇒ Object (also: #uistate)
- #uidatepickermode ⇒ Object
- #uidevice ⇒ Object
- #uideviceorientation ⇒ Object
- #uifont(size = UIFont.systemFontSize) ⇒ Object
- #uifontsize ⇒ Object
- #uigesturerecognizerstate ⇒ Object (also: #uigesturestate)
- #uiimagecamera ⇒ Object (also: #uiimagecameradevice, #uiimagedevice)
- #uiimagecapture ⇒ Object (also: #uiimagecapturemode)
- #uiimagequality ⇒ Object (also: #uiimagequalitytype)
- #uiimagesource ⇒ Object (also: #uiimagesourcetype)
- #uiinterfacemask ⇒ Object
- #uiinterfaceorientation ⇒ Object (also: #uiorientation)
- #uikeyboardtype ⇒ Object
- #uilinebreakmode ⇒ Object
- #uireturnkey ⇒ Object
- #uisegmentedstyle ⇒ Object (also: #uisegmentedcontrolstyle)
- #uistatusbarstyle ⇒ Object
- #uitablecellaccessory ⇒ Object (also: #uitableviewcellaccessorytype)
- #uitablecellselectionstyle ⇒ Object (also: #uitableviewcellselectionstyle)
- #uitablecellseparatorstyle ⇒ Object
- #uitablecellstyle ⇒ Object (also: #uitableviewcellstyle)
- #uitablerowanimation ⇒ Object (also: #uitableviewrowanimation)
- #uitablestyle ⇒ Object (also: #uitableviewstyle)
- #uitextalignment ⇒ Object (also: #uialignment)
Class Attribute Details
.activityindicator_styles ⇒ Object
Returns the value of attribute activityindicator_styles.
51 52 53 |
# File 'lib/sugarcube/symbol.rb', line 51 def @activityindicator_styles end |
.autoresizemasks ⇒ Object
Returns the value of attribute autoresizemasks.
37 38 39 |
# File 'lib/sugarcube/symbol.rb', line 37 def autoresizemasks @autoresizemasks end |
.barbuttomitems ⇒ Object
Returns the value of attribute barbuttomitems.
35 36 37 |
# File 'lib/sugarcube/symbol.rb', line 35 def @barbuttomitems end |
.barmetrics ⇒ Object
Returns the value of attribute barmetrics.
34 35 36 |
# File 'lib/sugarcube/symbol.rb', line 34 def @barmetrics end |
.baselineadjustments ⇒ Object
Returns the value of attribute baselineadjustments.
41 42 43 |
# File 'lib/sugarcube/symbol.rb', line 41 def baselineadjustments @baselineadjustments end |
.border_types ⇒ Object
Returns the value of attribute border_types.
48 49 50 |
# File 'lib/sugarcube/symbol.rb', line 48 def border_types @border_types end |
.buttontypes ⇒ Object
Returns the value of attribute buttontypes.
47 48 49 |
# File 'lib/sugarcube/symbol.rb', line 47 def @buttontypes end |
.ca_timingfunctions ⇒ Object
Returns the value of attribute ca_timingfunctions.
68 69 70 |
# File 'lib/sugarcube/symbol.rb', line 68 def ca_timingfunctions @ca_timingfunctions end |
.cg_linecapstyles ⇒ Object
Returns the value of attribute cg_linecapstyles.
70 71 72 |
# File 'lib/sugarcube/symbol.rb', line 70 def cg_linecapstyles @cg_linecapstyles end |
.cg_linejoinstyles ⇒ Object
Returns the value of attribute cg_linejoinstyles.
71 72 73 |
# File 'lib/sugarcube/symbol.rb', line 71 def cg_linejoinstyles @cg_linejoinstyles end |
.content_modes ⇒ Object
Returns the value of attribute content_modes.
54 55 56 |
# File 'lib/sugarcube/symbol.rb', line 54 def content_modes @content_modes end |
.control_events ⇒ Object
Returns the value of attribute control_events.
50 51 52 |
# File 'lib/sugarcube/symbol.rb', line 50 def control_events @control_events end |
.control_states ⇒ Object
Returns the value of attribute control_states.
49 50 51 |
# File 'lib/sugarcube/symbol.rb', line 49 def control_states @control_states end |
.css_colors ⇒ Object
Returns the value of attribute css_colors.
4 5 6 |
# File 'lib/sugarcube/symbol/symbol_uicolor.rb', line 4 def css_colors @css_colors end |
.date_styles ⇒ Object
Returns the value of attribute date_styles.
44 45 46 |
# File 'lib/sugarcube/symbol.rb', line 44 def date_styles @date_styles end |
.datepicker_modes ⇒ Object
Returns the value of attribute datepicker_modes.
53 54 55 |
# File 'lib/sugarcube/symbol.rb', line 53 def datepicker_modes @datepicker_modes end |
.device_orientations ⇒ Object
Returns the value of attribute device_orientations.
28 29 30 |
# File 'lib/sugarcube/symbol.rb', line 28 def device_orientations @device_orientations end |
.devices ⇒ Object
Returns the value of attribute devices.
27 28 29 |
# File 'lib/sugarcube/symbol.rb', line 27 def devices @devices end |
.font_sizes ⇒ Object
Returns the value of attribute font_sizes.
43 44 45 |
# File 'lib/sugarcube/symbol.rb', line 43 def font_sizes @font_sizes end |
.gesture_recognizer_states ⇒ Object
Returns the value of attribute gesture_recognizer_states.
73 74 75 |
# File 'lib/sugarcube/symbol.rb', line 73 def gesture_recognizer_states @gesture_recognizer_states end |
.image_cameradevice ⇒ Object
Returns the value of attribute image_cameradevice.
65 66 67 |
# File 'lib/sugarcube/symbol.rb', line 65 def image_cameradevice @image_cameradevice end |
.image_capturemode ⇒ Object
Returns the value of attribute image_capturemode.
64 65 66 |
# File 'lib/sugarcube/symbol.rb', line 64 def image_capturemode @image_capturemode end |
.image_quality ⇒ Object
Returns the value of attribute image_quality.
66 67 68 |
# File 'lib/sugarcube/symbol.rb', line 66 def image_quality @image_quality end |
.image_sourcetypes ⇒ Object
Returns the value of attribute image_sourcetypes.
63 64 65 |
# File 'lib/sugarcube/symbol.rb', line 63 def image_sourcetypes @image_sourcetypes end |
.interface_masks ⇒ Object
Returns the value of attribute interface_masks.
30 31 32 |
# File 'lib/sugarcube/symbol.rb', line 30 def interface_masks @interface_masks end |
.interface_orientations ⇒ Object
Returns the value of attribute interface_orientations.
29 30 31 |
# File 'lib/sugarcube/symbol.rb', line 29 def interface_orientations @interface_orientations end |
.keyboardtypes ⇒ Object
Returns the value of attribute keyboardtypes.
36 37 38 |
# File 'lib/sugarcube/symbol.rb', line 36 def keyboardtypes @keyboardtypes end |
.linebreakmodes ⇒ Object
Returns the value of attribute linebreakmodes.
40 41 42 |
# File 'lib/sugarcube/symbol.rb', line 40 def linebreakmodes @linebreakmodes end |
.number_styles ⇒ Object
Returns the value of attribute number_styles.
45 46 47 |
# File 'lib/sugarcube/symbol.rb', line 45 def number_styles @number_styles end |
.orientations ⇒ Object
Returns the value of attribute orientations.
31 32 33 |
# File 'lib/sugarcube/symbol.rb', line 31 def orientations @orientations end |
.returnkeys ⇒ Object
Returns the value of attribute returnkeys.
32 33 34 |
# File 'lib/sugarcube/symbol.rb', line 32 def returnkeys @returnkeys end |
.segmented_styles ⇒ Object
Returns the value of attribute segmented_styles.
52 53 54 |
# File 'lib/sugarcube/symbol.rb', line 52 def segmented_styles @segmented_styles end |
.statusbar_styles ⇒ Object
Returns the value of attribute statusbar_styles.
33 34 35 |
# File 'lib/sugarcube/symbol.rb', line 33 def @statusbar_styles end |
.system_fonts ⇒ Object
Returns the value of attribute system_fonts.
42 43 44 |
# File 'lib/sugarcube/symbol.rb', line 42 def system_fonts @system_fonts end |
.tableview_cellaccessorytype ⇒ Object
Returns the value of attribute tableview_cellaccessorytype.
59 60 61 |
# File 'lib/sugarcube/symbol.rb', line 59 def tableview_cellaccessorytype @tableview_cellaccessorytype end |
.tableview_cellselectionstyle ⇒ Object
Returns the value of attribute tableview_cellselectionstyle.
60 61 62 |
# File 'lib/sugarcube/symbol.rb', line 60 def tableview_cellselectionstyle @tableview_cellselectionstyle end |
.tableview_cellseparatorstyle ⇒ Object
Returns the value of attribute tableview_cellseparatorstyle.
61 62 63 |
# File 'lib/sugarcube/symbol.rb', line 61 def tableview_cellseparatorstyle @tableview_cellseparatorstyle end |
.tableview_cellstyles ⇒ Object
Returns the value of attribute tableview_cellstyles.
58 59 60 |
# File 'lib/sugarcube/symbol.rb', line 58 def tableview_cellstyles @tableview_cellstyles end |
.tableview_rowanimation ⇒ Object
Returns the value of attribute tableview_rowanimation.
57 58 59 |
# File 'lib/sugarcube/symbol.rb', line 57 def tableview_rowanimation @tableview_rowanimation end |
.tableview_styles ⇒ Object
Returns the value of attribute tableview_styles.
56 57 58 |
# File 'lib/sugarcube/symbol.rb', line 56 def tableview_styles @tableview_styles end |
.textalignments ⇒ Object
Returns the value of attribute textalignments.
39 40 41 |
# File 'lib/sugarcube/symbol.rb', line 39 def textalignments @textalignments end |
.uicolors ⇒ Object
Returns the value of attribute uicolors.
3 4 5 |
# File 'lib/sugarcube/symbol/symbol_uicolor.rb', line 3 def uicolors @uicolors end |
Instance Method Details
#catimingfunction ⇒ Object Also known as: catiming
637 638 639 |
# File 'lib/sugarcube/symbol.rb', line 637 def catimingfunction look_in(Symbol.ca_timingfunctions) end |
#cglinecap ⇒ Object Also known as: cglinecapstyle
642 643 644 |
# File 'lib/sugarcube/symbol.rb', line 642 def cglinecap look_in(Symbol.cg_linecapstyles) end |
#cglinejoin ⇒ Object Also known as: cglinejoinstyle
647 648 649 |
# File 'lib/sugarcube/symbol.rb', line 647 def cglinejoin look_in(Symbol.cg_linejoinstyles) end |
#cvar ⇒ Object
8 9 10 |
# File 'lib/sugarcube-unholy/ivar.rb', line 8 def cvar self.to_s.cvar end |
#ivar ⇒ Object
4 5 6 |
# File 'lib/sugarcube-unholy/ivar.rb', line 4 def ivar self.to_s.ivar end |
#nsdatestyle ⇒ Object Also known as: nsdateformatterstyle
680 681 682 |
# File 'lib/sugarcube/symbol.rb', line 680 def nsdatestyle look_in(Symbol.date_styles) end |
#nsnumberstyle ⇒ Object Also known as: nsnumberformatterstyle
685 686 687 |
# File 'lib/sugarcube/symbol.rb', line 685 def nsnumberstyle look_in(Symbol.number_styles) end |
#uiactivityindicatorstyle ⇒ Object Also known as: uiactivityindicatorviewstyle
543 544 545 |
# File 'lib/sugarcube/symbol.rb', line 543 def look_in(Symbol.) end |
#uiautoresizemask ⇒ Object Also known as: uiviewautoresizing, uiautoresizingmask, uiautoresize
609 610 611 |
# File 'lib/sugarcube/symbol.rb', line 609 def uiautoresizemask look_in(Symbol.autoresizemasks) end |
#uibarbuttonitem ⇒ Object
601 602 603 |
# File 'lib/sugarcube/symbol.rb', line 601 def look_in(Symbol.) end |
#uibarmetrics ⇒ Object
597 598 599 |
# File 'lib/sugarcube/symbol.rb', line 597 def look_in(Symbol.) end |
#uibaselineadjustment ⇒ Object Also known as: uibaseline
509 510 511 |
# File 'lib/sugarcube/symbol.rb', line 509 def uibaselineadjustment look_in(Symbol.baselineadjustments) end |
#uibordertype ⇒ Object Also known as: uiborderstyle
524 525 526 |
# File 'lib/sugarcube/symbol.rb', line 524 def uibordertype look_in(Symbol.border_types) end |
#uibuttontype ⇒ Object
520 521 522 |
# File 'lib/sugarcube/symbol.rb', line 520 def look_in(Symbol.) end |
#uicolor(alpha = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sugarcube/symbol/symbol_uicolor.rb', line 7 def uicolor(alpha=nil) if Symbol.uicolors.has_key? self # iOS colors color = UIColor.send(look_in(Symbol.uicolors)) if not alpha.nil? color = color.colorWithAlphaComponent(alpha.to_f) end else # css colors color = look_in(Symbol.css_colors).uicolor(alpha) end color end |
#uicontentmode ⇒ Object Also known as: uiviewcontentmode
559 560 561 |
# File 'lib/sugarcube/symbol.rb', line 559 def uicontentmode look_in(Symbol.content_modes) end |
#uicontrolevent ⇒ Object
535 536 537 |
# File 'lib/sugarcube/symbol.rb', line 535 def uicontrolevent look_in(Symbol.control_events) end |
#uicontrolstate ⇒ Object Also known as: uistate
529 530 531 |
# File 'lib/sugarcube/symbol.rb', line 529 def uicontrolstate look_in(Symbol.control_states) end |
#uidatepickermode ⇒ Object
555 556 557 |
# File 'lib/sugarcube/symbol.rb', line 555 def uidatepickermode look_in(Symbol.datepicker_modes) end |
#uidevice ⇒ Object
483 484 485 |
# File 'lib/sugarcube/symbol.rb', line 483 def uidevice look_in(Symbol.devices) end |
#uideviceorientation ⇒ Object
487 488 489 |
# File 'lib/sugarcube/symbol.rb', line 487 def uideviceorientation look_in(Symbol.device_orientations) end |
#uifont(size = UIFont.systemFontSize) ⇒ Object
657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
# File 'lib/sugarcube/symbol.rb', line 657 def uifont(size=UIFont.systemFontSize) # system fonts if Symbol.system_fonts.has_key? self font = look_in(Symbol.system_fonts) if size.is_a? Symbol size = Symbol.font_sizes.fetch(size).uifontsize end font = UIFont.send(font, size) else size = look_in(font_sizes).uifontsize font = UIFont.systemFontOfSize(size) end font end |
#uifontsize ⇒ Object
672 673 674 675 676 677 678 |
# File 'lib/sugarcube/symbol.rb', line 672 def uifontsize size = look_in(Symbol.system_fonts) if size.is_a? Symbol return UIFont.send(Symbol.font_sizes[self]) end return size.to_f end |
#uigesturerecognizerstate ⇒ Object Also known as: uigesturestate
652 653 654 |
# File 'lib/sugarcube/symbol.rb', line 652 def uigesturerecognizerstate look_in(Symbol.gesture_recognizer_states) end |
#uiimagecamera ⇒ Object Also known as: uiimagecameradevice, uiimagedevice
626 627 628 |
# File 'lib/sugarcube/symbol.rb', line 626 def uiimagecamera look_in(Symbol.image_cameradevice) end |
#uiimagecapture ⇒ Object Also known as: uiimagecapturemode
621 622 623 |
# File 'lib/sugarcube/symbol.rb', line 621 def uiimagecapture look_in(Symbol.image_capturemode) end |
#uiimagequality ⇒ Object Also known as: uiimagequalitytype
632 633 634 |
# File 'lib/sugarcube/symbol.rb', line 632 def uiimagequality look_in(Symbol.image_quality) end |
#uiimagesource ⇒ Object Also known as: uiimagesourcetype
616 617 618 |
# File 'lib/sugarcube/symbol.rb', line 616 def uiimagesource look_in(Symbol.image_sourcetypes) end |
#uiinterfacemask ⇒ Object
495 496 497 |
# File 'lib/sugarcube/symbol.rb', line 495 def uiinterfacemask look_in(Symbol.interface_masks) end |
#uiinterfaceorientation ⇒ Object Also known as: uiorientation
491 492 493 |
# File 'lib/sugarcube/symbol.rb', line 491 def uiinterfaceorientation look_in(Symbol.interface_orientations) end |
#uikeyboardtype ⇒ Object
605 606 607 |
# File 'lib/sugarcube/symbol.rb', line 605 def uikeyboardtype look_in(Symbol.keyboardtypes) end |
#uilinebreakmode ⇒ Object
505 506 507 |
# File 'lib/sugarcube/symbol.rb', line 505 def uilinebreakmode look_in(Symbol.linebreakmodes) end |
#uireturnkey ⇒ Object
539 540 541 |
# File 'lib/sugarcube/symbol.rb', line 539 def uireturnkey look_in(Symbol.returnkeys) end |
#uisegmentedstyle ⇒ Object Also known as: uisegmentedcontrolstyle
549 550 551 |
# File 'lib/sugarcube/symbol.rb', line 549 def uisegmentedstyle look_in(Symbol.segmented_styles) end |
#uistatusbarstyle ⇒ Object
593 594 595 |
# File 'lib/sugarcube/symbol.rb', line 593 def look_in(Symbol.) end |
#uitablecellaccessory ⇒ Object Also known as: uitableviewcellaccessorytype
579 580 581 |
# File 'lib/sugarcube/symbol.rb', line 579 def uitablecellaccessory look_in(Symbol.tableview_cellaccessorytype) end |
#uitablecellselectionstyle ⇒ Object Also known as: uitableviewcellselectionstyle
584 585 586 |
# File 'lib/sugarcube/symbol.rb', line 584 def uitablecellselectionstyle look_in(Symbol.tableview_cellselectionstyle) end |
#uitablecellseparatorstyle ⇒ Object
589 590 591 |
# File 'lib/sugarcube/symbol.rb', line 589 def uitablecellseparatorstyle look_in(Symbol.tableview_cellseparatorstyle) end |
#uitablecellstyle ⇒ Object Also known as: uitableviewcellstyle
574 575 576 |
# File 'lib/sugarcube/symbol.rb', line 574 def uitablecellstyle look_in(Symbol.tableview_cellstyles) end |
#uitablerowanimation ⇒ Object Also known as: uitableviewrowanimation
569 570 571 |
# File 'lib/sugarcube/symbol.rb', line 569 def uitablerowanimation look_in(Symbol.tableview_rowanimation) end |
#uitablestyle ⇒ Object Also known as: uitableviewstyle
564 565 566 |
# File 'lib/sugarcube/symbol.rb', line 564 def uitablestyle look_in(Symbol.tableview_styles) end |
#uitextalignment ⇒ Object Also known as: uialignment
499 500 501 |
# File 'lib/sugarcube/symbol.rb', line 499 def uitextalignment look_in(Symbol.textalignments) end |