Created
September 20, 2015 03:14
-
-
Save tcuongtran/79ea947b2d386433a1e8 to your computer and use it in GitHub Desktop.
Swift Activity Indicator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let indicator:UIActivityIndicatorView = UIActivityIndicatorView (activityIndicatorStyle: UIActivityIndicatorViewStyle.Gray) | |
indicator.color = UIColor.blackColor() | |
indicator.frame = CGRectMake(0.0, 0.0, 10.0, 10.0) | |
indicator.center = self.view.center | |
self.view.addSubview(indicator) | |
indicator.bringSubviewToFront(self.view) | |
indicator.startAnimating() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment