File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
ios/FluentUI.Demo/FluentUI.Demo/Demos Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class ActivityIndicatorDemoController: DemoTableViewController {
5252 return UITableViewCell ( )
5353 }
5454
55- cell. setup ( action1Title: row . title )
55+ cell. setup ( action1Title: isAnimating ? " Stop Activity " : " Start Activity " )
5656 cell. action1Button. addTarget ( self ,
5757 action: #selector( startStopActivity) ,
5858 for: . touchUpInside)
@@ -191,7 +191,7 @@ class ActivityIndicatorDemoController: DemoTableViewController {
191191 case . hidesWhenStopped:
192192 return " Hides when stopped "
193193 case . startStopActivity:
194- return " Start / Stop activity "
194+ return " "
195195 case . demoOfSize:
196196 return " "
197197 }
@@ -235,6 +235,13 @@ class ActivityIndicatorDemoController: DemoTableViewController {
235235
236236 @objc private func startStopActivity( ) {
237237 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)
238245 }
239246}
240247
You can’t perform that action at this time.
0 commit comments