Class: UIButton

Inherits:
Object show all
Defined in:
lib/ios/sugarcube-ui/uibutton.rb,
lib/ios/sugarcube-factories/uibutton.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.contactObject



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.buttonWithType(UIButtonTypeContactAdd)
end

.contact_addObject



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.buttonWithType(UIButtonTypeContactAdd)
end

.customObject



3
4
5
# File 'lib/ios/sugarcube-factories/uibutton.rb', line 3

def custom
  self.buttonWithType(UIButtonTypeCustom)
end

.detailObject



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.buttonWithType(UIButtonTypeDetailDisclosure)
end

.detail_disclosureObject



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.buttonWithType(UIButtonTypeDetailDisclosure)
end

.infoObject



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.buttonWithType(UIButtonTypeInfoLight)
end

.info_darkObject



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.buttonWithType(UIButtonTypeInfoDark)
end

.info_lightObject



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.buttonWithType(UIButtonTypeInfoLight)
end

.roundedObject



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.buttonWithType(UIButtonTypeRoundedRect)
end

.rounded_rectObject



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.buttonWithType(UIButtonTypeRoundedRect)
end

.systemObject



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.buttonWithType(UIButtonTypeSystem)
end

Instance Method Details

#attributedTitleObject 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

#titleObject



3
4
5
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 3

def title
  titleForState(UIControlStateNormal)
end

#titleColorObject Also known as: title_color



11
12
13
# File 'lib/ios/sugarcube-ui/uibutton.rb', line 11

def titleColor
  titleColorForState(UIControlStateNormal)
end