File tree 1 file changed +9
-2
lines changed
ios/FluentUI.Demo/FluentUI.Demo/Demos
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class ActivityIndicatorDemoController: DemoTableViewController {
52
52
return UITableViewCell ( )
53
53
}
54
54
55
- cell. setup ( action1Title: row . title )
55
+ cell. setup ( action1Title: isAnimating ? " Stop Activity " : " Start Activity " )
56
56
cell. action1Button. addTarget ( self ,
57
57
action: #selector( startStopActivity) ,
58
58
for: . touchUpInside)
@@ -191,7 +191,7 @@ class ActivityIndicatorDemoController: DemoTableViewController {
191
191
case . hidesWhenStopped:
192
192
return " Hides when stopped "
193
193
case . startStopActivity:
194
- return " Start / Stop activity "
194
+ return " "
195
195
case . demoOfSize:
196
196
return " "
197
197
}
@@ -235,6 +235,13 @@ class ActivityIndicatorDemoController: DemoTableViewController {
235
235
236
236
@objc private func startStopActivity( ) {
237
237
isAnimating. toggle ( )
238
+
239
+ guard let section: Int = ActivityIndicatorDemoSection . allCases. firstIndex ( of: . settings) ,
240
+ let row: Int = ActivityIndicatorDemoSection . settings. rows. firstIndex ( of: . startStopActivity) else {
241
+ return
242
+ }
243
+ // Reloading row to update the button title
244
+ tableView. reloadRows ( at: [ . init( row: row, section: section) ] , with: . automatic)
238
245
}
239
246
}
240
247
You can’t perform that action at this time.
0 commit comments