Skip to content

Commit 0f7f430

Browse files
committed
Updating examples
1 parent 1d76349 commit 0f7f430

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

SwiftIcons/ObjectsDetailsViewController.swift

+7-6
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class ObjectsDetailsViewController: UIViewController {
138138
button1.setIcon(icon: .linearIcons(.phone), forState: .normal)
139139

140140
let button2 = UIButton(frame: CGRect(x: screenWidth/2+20, y: 20, width: screenWidth/2-40, height: screenWidth/2-40))
141-
button2.setIcon(icon: .openIconic(.clipboard), iconSize: 70, color: textColor, forState: .normal)
141+
button2.setIcon(icon: .openIconic(.clipboard), iconSize: 70, color: textColor, backgroundColor: .blue, forState: .normal)
142142

143143
let button3 = UIButton(frame: CGRect(x: 20, y: screenWidth/2, width: screenWidth/2-40, height: screenWidth/2-40))
144144
button3.setIcon(prefixText: "Please ", icon: .googleMaterialDesign(.print), postfixText: " print", forState: .normal)
@@ -147,11 +147,11 @@ class ObjectsDetailsViewController: UIViewController {
147147
button4.setIcon(prefixText: "Happy ", prefixTextFont: font1!, icon: .ionicons(.happy), postfixText: " face", postfixTextFont: font2!, forState: .normal)
148148

149149
let button5 = UIButton(frame: CGRect(x: 20, y: screenWidth-20, width: screenWidth/2-40, height: screenWidth/2-40))
150-
button5.setIcon(prefixText: "Lock ", prefixTextColor: .red, icon: .googleMaterialDesign(.lock), iconColor: textColor, postfixText: " icon", postfixTextColor: .blue, forState: .normal, textSize: 15, iconSize: 20)
151-
150+
button5.setIcon(prefixText: "Lock ", prefixTextColor: .red, icon: .googleMaterialDesign(.lock), iconColor: textColor, postfixText: " icon", postfixTextColor: .blue, backgroundColor: .yellow, forState: .normal, textSize: 15, iconSize: 20)
151+
152152
let button6 = UIButton(frame: CGRect(x: screenWidth/2+20, y: screenWidth-20, width: screenWidth/2-40, height: screenWidth/2-40))
153153
button6.setIcon(prefixText: "Pulse ", prefixTextFont: font1!, prefixTextColor: .darkGray, icon: .openIconic(.pulse), iconColor: textColor, postfixText: " icon", postfixTextFont: font2!, postfixTextColor: .purple, forState: .normal, iconSize: 40)
154-
154+
155155
scrollView.addSubview(button1)
156156
scrollView.addSubview(button2)
157157
scrollView.addSubview(button3)
@@ -180,8 +180,7 @@ class ObjectsDetailsViewController: UIViewController {
180180
scrollView.addSubview(segmentedControl2)
181181
break
182182

183-
case 5:
184-
183+
case 5:
185184
break
186185

187186
case 6:
@@ -243,6 +242,8 @@ class ObjectsDetailsViewController: UIViewController {
243242
scrollView.addSubview(textfield4)
244243
scrollView.addSubview(textfield5)
245244
scrollView.addSubview(textfield6)
245+
246+
scrollView.contentSize = CGSize(width: screenWidth, height: 3*screenWidth/2-40)
246247
break
247248
case 10:
248249
let stepper1 = UIStepper(frame: CGRect(x: 20, y: 20, width: screenWidth/2-40, height: 40))

0 commit comments

Comments
 (0)