Class: UIButton
- Defined in:
- lib/ios/sugarcube-ui/uibutton.rb,
lib/ios/sugarcube-factories/uibutton.rb more...
Class Method Summary collapse
- .contact ⇒ Object
- .contact_add ⇒ Object
- .custom ⇒ Object
- .detail ⇒ Object
- .detail_disclosure ⇒ Object
- .info ⇒ Object
- .info_dark ⇒ Object
- .info_light ⇒ Object
- .rounded ⇒ Object
- .rounded_rect ⇒ Object
- .system ⇒ Object
Instance Method Summary collapse
- #attributedTitle ⇒ Object (also: #attributed_title)
- #setAttributedTitle(value) ⇒ Object (also: #attributed_title=)
- #setTitle(value) ⇒ Object
- #setTitleColor(value) ⇒ Object (also: #title_color=)
- #title ⇒ Object
- #titleColor ⇒ Object (also: #title_color)
Class Method Details
permalink .contact ⇒ Object
[View source]
56 57 58 59 60 61 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 56 def contact if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeContactAdd) end |
permalink .contact_add ⇒ Object
[View source]
63 64 65 66 67 68 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 63 def contact_add if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeContactAdd) end |
permalink .custom ⇒ Object
[View source]
3 4 5 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 3 def custom self.(UIButtonTypeCustom) end |
permalink .detail ⇒ Object
[View source]
21 22 23 24 25 26 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 21 def detail if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeDetailDisclosure) end |
permalink .detail_disclosure ⇒ Object
[View source]
28 29 30 31 32 33 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 28 def detail_disclosure if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeDetailDisclosure) end |
permalink .info ⇒ Object
[View source]
35 36 37 38 39 40 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 35 def info if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeInfoLight) end |
permalink .info_dark ⇒ Object
[View source]
49 50 51 52 53 54 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 49 def info_dark if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeInfoDark) end |
permalink .info_light ⇒ Object
[View source]
42 43 44 45 46 47 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 42 def info_light if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeInfoLight) end |
permalink .rounded ⇒ Object
[View source]
7 8 9 10 11 12 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 7 def rounded if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeRoundedRect) end |
permalink .rounded_rect ⇒ Object
[View source]
14 15 16 17 18 19 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 14 def rounded_rect if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeRoundedRect) end |
permalink .system ⇒ Object
[View source]
70 71 72 73 74 75 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 70 def system if self != UIButton raise "Custom subclasses of UIButton must be created using UIButton.custom" end self.(UIButtonTypeSystem) end |
Instance Method Details
permalink #attributedTitle ⇒ Object Also known as: attributed_title
[View source]
22 23 24 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 22 def attributedTitle attributedTitleForState(UIControlStateNormal) end |
permalink #setAttributedTitle(value) ⇒ Object Also known as: attributed_title=
[View source]
27 28 29 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 27 def setAttributedTitle(value) setAttributedTitle(value, forState: UIControlStateNormal) end |
permalink #setTitle(value) ⇒ Object
[View source]
7 8 9 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 7 def setTitle(value) setTitle(value, forState: UIControlStateNormal) end |
permalink #setTitleColor(value) ⇒ Object Also known as: title_color=
[View source]
16 17 18 19 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 16 def setTitleColor(value) value = value.uicolor if value.respond_to?(:uicolor) setTitleColor(value, forState: UIControlStateNormal) end |
permalink #title ⇒ Object
[View source]
3 4 5 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 3 def title titleForState(UIControlStateNormal) end |
permalink #titleColor ⇒ Object Also known as: title_color
[View source]
11 12 13 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 11 def titleColor titleColorForState(UIControlStateNormal) end |