File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
ios/FluentUI.Demo/FluentUI.Demo/Demos Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ class ActivityIndicatorDemoController: DemoTableViewController {
5252 return UITableViewCell ( )
5353 }
5454
55- cell. setup ( action1Title: row . title )
55+ cell. setup ( action1Title: activityActionButtonTitle )
5656 cell. action1Button. addTarget ( self ,
57- action: #selector( startStopActivity) ,
57+ action: #selector( startStopActivity ( _ : ) ) ,
5858 for: . touchUpInside)
5959 cell. bottomSeparatorType = . full
6060 return cell
@@ -153,6 +153,8 @@ class ActivityIndicatorDemoController: DemoTableViewController {
153153 }
154154 }
155155
156+ private var activityActionButtonTitle : String { isAnimating ? " Stop Activity " : " Start Activity " }
157+
156158 private var defaultColorIndicators : [ MSFActivityIndicatorSize : MSFActivityIndicator ] = {
157159 var defaultColorIndicators : [ MSFActivityIndicatorSize : MSFActivityIndicator ] = [ : ]
158160
@@ -191,7 +193,7 @@ class ActivityIndicatorDemoController: DemoTableViewController {
191193 case . hidesWhenStopped:
192194 return " Hides when stopped "
193195 case . startStopActivity:
194- return " Start / Stop activity "
196+ return " "
195197 case . demoOfSize:
196198 return " "
197199 }
@@ -233,8 +235,9 @@ class ActivityIndicatorDemoController: DemoTableViewController {
233235
234236 private let xLargeSize : CGFloat = 36
235237
236- @objc private func startStopActivity( ) {
238+ @objc private func startStopActivity( _ sender : UIButton ) {
237239 isAnimating. toggle ( )
240+ sender. setTitle ( activityActionButtonTitle, for: . normal)
238241 }
239242}
240243
You can’t perform that action at this time.
0 commit comments