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)
- #setter ⇒ Object
- #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 = nil) ⇒ 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
654 655 656 |
# File 'lib/sugarcube/symbol.rb', line 654 def catimingfunction look_in(Symbol.ca_timingfunctions) end |
#cglinecap ⇒ Object Also known as: cglinecapstyle
659 660 661 |
# File 'lib/sugarcube/symbol.rb', line 659 def cglinecap look_in(Symbol.cg_linecapstyles) end |
#cglinejoin ⇒ Object Also known as: cglinejoinstyle
664 665 666 |
# File 'lib/sugarcube/symbol.rb', line 664 def cglinejoin look_in(Symbol.cg_linejoinstyles) end |
#cvar ⇒ Object
12 13 14 |
# File 'lib/sugarcube-unholy/ivar.rb', line 12 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
704 705 706 |
# File 'lib/sugarcube/symbol.rb', line 704 def nsdatestyle look_in(Symbol.date_styles) end |
#nsnumberstyle ⇒ Object Also known as: nsnumberformatterstyle
709 710 711 |
# File 'lib/sugarcube/symbol.rb', line 709 def nsnumberstyle look_in(Symbol.number_styles) end |
#setter ⇒ Object
8 9 10 |
# File 'lib/sugarcube-unholy/ivar.rb', line 8 def setter self.to_s.setter end |
#uiactivityindicatorstyle ⇒ Object Also known as: uiactivityindicatorviewstyle
560 561 562 |
# File 'lib/sugarcube/symbol.rb', line 560 def look_in(Symbol.) end |
#uiautoresizemask ⇒ Object Also known as: uiviewautoresizing, uiautoresizingmask, uiautoresize
626 627 628 |
# File 'lib/sugarcube/symbol.rb', line 626 def uiautoresizemask look_in(Symbol.autoresizemasks) end |
#uibarbuttonitem ⇒ Object
618 619 620 |
# File 'lib/sugarcube/symbol.rb', line 618 def look_in(Symbol.) end |
#uibarmetrics ⇒ Object
614 615 616 |
# File 'lib/sugarcube/symbol.rb', line 614 def look_in(Symbol.) end |
#uibaselineadjustment ⇒ Object Also known as: uibaseline
526 527 528 |
# File 'lib/sugarcube/symbol.rb', line 526 def uibaselineadjustment look_in(Symbol.baselineadjustments) end |
#uibordertype ⇒ Object Also known as: uiborderstyle
541 542 543 |
# File 'lib/sugarcube/symbol.rb', line 541 def uibordertype look_in(Symbol.border_types) end |
#uibuttontype ⇒ Object
537 538 539 |
# File 'lib/sugarcube/symbol.rb', line 537 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
576 577 578 |
# File 'lib/sugarcube/symbol.rb', line 576 def uicontentmode look_in(Symbol.content_modes) end |
#uicontrolevent ⇒ Object
552 553 554 |
# File 'lib/sugarcube/symbol.rb', line 552 def uicontrolevent look_in(Symbol.control_events) end |
#uicontrolstate ⇒ Object Also known as: uistate
546 547 548 |
# File 'lib/sugarcube/symbol.rb', line 546 def uicontrolstate look_in(Symbol.control_states) end |
#uidatepickermode ⇒ Object
572 573 574 |
# File 'lib/sugarcube/symbol.rb', line 572 def uidatepickermode look_in(Symbol.datepicker_modes) end |
#uidevice ⇒ Object
500 501 502 |
# File 'lib/sugarcube/symbol.rb', line 500 def uidevice look_in(Symbol.devices) end |
#uideviceorientation ⇒ Object
504 505 506 |
# File 'lib/sugarcube/symbol.rb', line 504 def uideviceorientation look_in(Symbol.device_orientations) end |
#uifont(size = nil) ⇒ Object
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 |
# File 'lib/sugarcube/symbol.rb', line 674 def uifont(size=nil) size ||= UIFont.systemFontSize # system fonts if Symbol.system_fonts.has_key? self font = look_in(Symbol.system_fonts) 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 |
#uifontsize ⇒ Object
696 697 698 699 700 701 702 |
# File 'lib/sugarcube/symbol.rb', line 696 def uifontsize size = look_in(Symbol.font_sizes) if size.is_a?(Symbol) return UIFont.send(size) end return size.to_f end |
#uigesturerecognizerstate ⇒ Object Also known as: uigesturestate
669 670 671 |
# File 'lib/sugarcube/symbol.rb', line 669 def uigesturerecognizerstate look_in(Symbol.gesture_recognizer_states) end |
#uiimagecamera ⇒ Object Also known as: uiimagecameradevice, uiimagedevice
643 644 645 |
# File 'lib/sugarcube/symbol.rb', line 643 def uiimagecamera look_in(Symbol.image_cameradevice) end |
#uiimagecapture ⇒ Object Also known as: uiimagecapturemode
638 639 640 |
# File 'lib/sugarcube/symbol.rb', line 638 def uiimagecapture look_in(Symbol.image_capturemode) end |
#uiimagequality ⇒ Object Also known as: uiimagequalitytype
649 650 651 |
# File 'lib/sugarcube/symbol.rb', line 649 def uiimagequality look_in(Symbol.image_quality) end |
#uiimagesource ⇒ Object Also known as: uiimagesourcetype
633 634 635 |
# File 'lib/sugarcube/symbol.rb', line 633 def uiimagesource look_in(Symbol.image_sourcetypes) end |
#uiinterfacemask ⇒ Object
512 513 514 |
# File 'lib/sugarcube/symbol.rb', line 512 def uiinterfacemask look_in(Symbol.interface_masks) end |
#uiinterfaceorientation ⇒ Object Also known as: uiorientation
508 509 510 |
# File 'lib/sugarcube/symbol.rb', line 508 def uiinterfaceorientation look_in(Symbol.interface_orientations) end |
#uikeyboardtype ⇒ Object
622 623 624 |
# File 'lib/sugarcube/symbol.rb', line 622 def uikeyboardtype look_in(Symbol.keyboardtypes) end |
#uilinebreakmode ⇒ Object
522 523 524 |
# File 'lib/sugarcube/symbol.rb', line 522 def uilinebreakmode look_in(Symbol.linebreakmodes) end |
#uireturnkey ⇒ Object
556 557 558 |
# File 'lib/sugarcube/symbol.rb', line 556 def uireturnkey look_in(Symbol.returnkeys) end |
#uisegmentedstyle ⇒ Object Also known as: uisegmentedcontrolstyle
566 567 568 |
# File 'lib/sugarcube/symbol.rb', line 566 def uisegmentedstyle look_in(Symbol.segmented_styles) end |
#uistatusbarstyle ⇒ Object
610 611 612 |
# File 'lib/sugarcube/symbol.rb', line 610 def look_in(Symbol.) end |
#uitablecellaccessory ⇒ Object Also known as: uitableviewcellaccessorytype
596 597 598 |
# File 'lib/sugarcube/symbol.rb', line 596 def uitablecellaccessory look_in(Symbol.tableview_cellaccessorytype) end |
#uitablecellselectionstyle ⇒ Object Also known as: uitableviewcellselectionstyle
601 602 603 |
# File 'lib/sugarcube/symbol.rb', line 601 def uitablecellselectionstyle look_in(Symbol.tableview_cellselectionstyle) end |
#uitablecellseparatorstyle ⇒ Object
606 607 608 |
# File 'lib/sugarcube/symbol.rb', line 606 def uitablecellseparatorstyle look_in(Symbol.tableview_cellseparatorstyle) end |
#uitablecellstyle ⇒ Object Also known as: uitableviewcellstyle
591 592 593 |
# File 'lib/sugarcube/symbol.rb', line 591 def uitablecellstyle look_in(Symbol.tableview_cellstyles) end |
#uitablerowanimation ⇒ Object Also known as: uitableviewrowanimation
586 587 588 |
# File 'lib/sugarcube/symbol.rb', line 586 def uitablerowanimation look_in(Symbol.tableview_rowanimation) end |
#uitablestyle ⇒ Object Also known as: uitableviewstyle
581 582 583 |
# File 'lib/sugarcube/symbol.rb', line 581 def uitablestyle look_in(Symbol.tableview_styles) end |
#uitextalignment ⇒ Object Also known as: uialignment
516 517 518 |
# File 'lib/sugarcube/symbol.rb', line 516 def uitextalignment look_in(Symbol.textalignments) end |