shu223 / PulsingHalo

iOS Component for creating a pulsing animation.
MIT License
1.77k stars 240 forks source link

How to use on swift? #28

Closed nassarofficial closed 8 years ago

nassarofficial commented 8 years ago

How could I initiate a pulse on swift?

acegreen commented 8 years ago
            var activityIndicator: PulsingHaloLayer!

            self.activityIndicator = PulsingHaloLayer(layerNumber: 3)
            self.activityIndicator.position = getCenterOfView(self.view)
            self.activityIndicator.radius = self.view.bounds.height / 2
            self.activityIndicator.backgroundColor = UIColor.grayColor().CGColor
            self.activityIndicator.useTimingFunction = false
            self.view.layer.addSublayer(self.activityIndicator)
shu223 commented 8 years ago

Hi, I updated the README.