Class: UIButton
- Defined in:
- lib/ios/sugarcube-ui/uibutton.rb,
lib/ios/sugarcube-factories/uibutton.rb
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
.contact ⇒ Object
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 |
.contact_add ⇒ Object
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 |
.custom ⇒ Object
3 4 5 |
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 3 def custom self.(UIButtonTypeCustom) end |
.detail ⇒ Object
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 |
.detail_disclosure ⇒ Object
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 |
.info ⇒ Object
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 |
.info_dark ⇒ Object
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 |
.info_light ⇒ Object
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 |
.rounded ⇒ Object
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 |
Instance Method Details
#attributedTitle ⇒ Object Also known as: attributed_title
22 23 24 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 22 def attributedTitle attributedTitleForState(UIControlStateNormal) end |
#setAttributedTitle(value) ⇒ Object Also known as: attributed_title=
27 28 29 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 27 def setAttributedTitle(value) setAttributedTitle(value, forState: UIControlStateNormal) end |
#setTitle(value) ⇒ Object
7 8 9 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 7 def setTitle(value) setTitle(value, forState: UIControlStateNormal) end |
#setTitleColor(value) ⇒ Object Also known as: title_color=
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 |
#title ⇒ Object
3 4 5 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 3 def title titleForState(UIControlStateNormal) end |
#titleColor ⇒ Object Also known as: title_color
11 12 13 |
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 11 def titleColor titleColorForState(UIControlStateNormal) end |