lib/sugarcube/symbol.rb in sugarcube-0.7.2 vs lib/sugarcube/symbol.rb in sugarcube-0.7.3
- old
+ new
@@ -23,31 +23,36 @@
:big.uifont => UIFont
=end
class Symbol
class << self
attr_accessor :devices
+ attr_accessor :orientations
+ attr_accessor :returnkeys
+ attr_accessor :statusbar_styles
+ attr_accessor :barmetrics
+ attr_accessor :barbuttomitems
+ attr_accessor :keyboardtypes
+
attr_accessor :textalignments
attr_accessor :linebreakmodes
attr_accessor :baselineadjustments
- attr_accessor :orientations
+ attr_accessor :system_fonts
+ attr_accessor :font_sizes
+
attr_accessor :buttontypes
attr_accessor :bordertypes
attr_accessor :controlstates
attr_accessor :controlevents
- attr_accessor :system_fonts
- attr_accessor :font_sizes
- attr_accessor :returnkeys
attr_accessor :activityindicator_styles
+ attr_accessor :segmented_styles
+ attr_accessor :datepicker_modes
+
attr_accessor :tableview_styles
attr_accessor :tableview_rowanimation
attr_accessor :tableview_cellstyles
attr_accessor :tableview_cellaccessorytype
attr_accessor :tableview_cellselectionstyle
- attr_accessor :statusbar_styles
- attr_accessor :barmetrics
- attr_accessor :barbuttomitems
- attr_accessor :keyboardtypes
end
@devices = {
iphone: UIUserInterfaceIdiomPhone,
ipad: UIUserInterfaceIdiomPad,
@@ -112,10 +117,11 @@
@controlevents = {
touch: UIControlEventTouchUpInside,
touch_up: UIControlEventTouchUpInside,
touch_down: UIControlEventTouchDown,
+ changed: UIControlEventValueChanged,
touch_down_repeat: UIControlEventTouchDownRepeat,
touch_drag_inside: UIControlEventTouchDragInside,
touch_drag_outside: UIControlEventTouchDragOutside,
touch_drag_enter: UIControlEventTouchDragEnter,
@@ -170,10 +176,24 @@
whitelarge: UIActivityIndicatorViewStyleWhiteLarge,
white: UIActivityIndicatorViewStyleWhite,
gray: UIActivityIndicatorViewStyleGray,
}
+ @segmented_styles = {
+ plain: UISegmentedControlStylePlain,
+ bordered: UISegmentedControlStyleBordered,
+ bar: UISegmentedControlStyleBar,
+ bezeled: UISegmentedControlStyleBezeled,
+ }
+
+ @datepicker_modes = {
+ time: UIDatePickerModeTime,
+ date: UIDatePickerModeDate,
+ dateandtime: UIDatePickerModeDateAndTime,
+ countdowntimer: UIDatePickerModeCountDownTimer
+ }
+
@tableview_styles = {
plain: UITableViewStylePlain,
grouped: UITableViewStyleGrouped,
}
@@ -311,9 +331,18 @@
def uiactivityindicatorstyle
look_in(Symbol.activityindicator_styles)
end
alias :uiactivityindicatorviewstyle :uiactivityindicatorstyle
+
+ def uisegmentedstyle
+ look_in(Symbol.segmented_styles)
+ end
+ alias :uisegmentedcontrolstyle :uisegmentedstyle
+
+ def uidatepickermode
+ look_in(Symbol.datepicker_modes)
+ end
def uitablestyle
look_in(Symbol.tableview_styles)
end
alias :uitableviewstyle :uitablestyle