File tree 1 file changed +7
-4
lines changed
ios/FluentUI.Demo/FluentUI.Demo/Demos
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ class ActivityIndicatorDemoController: DemoTableViewController {
52
52
return UITableViewCell ( )
53
53
}
54
54
55
- cell. setup ( action1Title: row . title )
55
+ cell. setup ( action1Title: activityActionButtonTitle )
56
56
cell. action1Button. addTarget ( self ,
57
- action: #selector( startStopActivity) ,
57
+ action: #selector( startStopActivity ( _ : ) ) ,
58
58
for: . touchUpInside)
59
59
cell. bottomSeparatorType = . full
60
60
return cell
@@ -153,6 +153,8 @@ class ActivityIndicatorDemoController: DemoTableViewController {
153
153
}
154
154
}
155
155
156
+ private var activityActionButtonTitle : String { isAnimating ? " Stop Activity " : " Start Activity " }
157
+
156
158
private var defaultColorIndicators : [ MSFActivityIndicatorSize : MSFActivityIndicator ] = {
157
159
var defaultColorIndicators : [ MSFActivityIndicatorSize : MSFActivityIndicator ] = [ : ]
158
160
@@ -191,7 +193,7 @@ class ActivityIndicatorDemoController: DemoTableViewController {
191
193
case . hidesWhenStopped:
192
194
return " Hides when stopped "
193
195
case . startStopActivity:
194
- return " Start / Stop activity "
196
+ return " "
195
197
case . demoOfSize:
196
198
return " "
197
199
}
@@ -233,8 +235,9 @@ class ActivityIndicatorDemoController: DemoTableViewController {
233
235
234
236
private let xLargeSize : CGFloat = 36
235
237
236
- @objc private func startStopActivity( ) {
238
+ @objc private func startStopActivity( _ sender : UIButton ) {
237
239
isAnimating. toggle ( )
240
+ sender. setTitle ( activityActionButtonTitle, for: . normal)
238
241
}
239
242
}
240
243
You can’t perform that action at this time.
0 commit comments