Created
May 29, 2016 14:00
-
-
Save chashmeetsingh/21e48123031006f1c2fc0d7714fa7257 to your computer and use it in GitHub Desktop.
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
import UIKit | |
import SpriteKit | |
import ParticlesLoadingView | |
class ViewController: UIViewController { | |
lazy var loadingView: ParticlesLoadingView = { | |
let x = UIScreen.mainScreen().bounds.size.width / 2 - (75 / 2) - 200 | |
let y = UIScreen.mainScreen().bounds.size.height / 2 - (75 / 2) | |
let view = ParticlesLoadingView(frame: CGRect(x: x, y: y, width: 75, height: 75)) | |
view.particleEffect = .Laser | |
view.duration = 1.5 | |
view.particlesSize = 15.0 | |
view.clockwiseRotation = true | |
view.layer.borderColor = UIColor.lightGrayColor().CGColor | |
view.layer.borderWidth = 1.0 | |
view.layer.cornerRadius = 15.0 | |
return view | |
}() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.addSubview(loadingView) | |
loadingView.startAnimating() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment