Comments (3)
Here's how I got it working...
- Declare a Pulsator on
MyViewController
:
let pulsator = Pulsator()
- In
viewDidLoad
, set yourpulsator
properties what view you want to add it to, etc.
yourImageView.layer.superlayer?.insertSublayer(pulsator, below: yourImageView.layer)
pulsator.numPulse = 3
pulsator.backgroundColor = UIColor.red.cgColor
pulsator.radius = containerView.bounds.width / 2
This is why mine wasn't centering in the imageView
3) If you don't have viewDidLayoutSubviews
configured, do so...
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
view.layer.layoutIfNeeded()
pulsator.position = yourImageView.center
}
- Wherever you want it to start pulsing, then call
pulsator.start()
. Wherever you want it to stop, callpulsator.stop()
from pulsator.
Same issue for me too
from pulsator.
@andrewfashion have you figured it out yet???
from pulsator.
Related Issues (20)
- Google Map HOT 2
- UI Issues HOT 1
- Can't get the pulse positioned behind a button... HOT 5
- No such module 'QuartzCore.QuartzCore'
- Is there any way to delay the start of the next animation cycle once the first is complete?
- Carthage build fails HOT 5
- square pulse in google map? HOT 1
- Won't compile on Swift 4.2 HOT 8
- NavigationBar bar button customView doesn't work properly.
- Pulsator animaton does not appear HOT 4
- Swift 4.2 is not available 0.5.3 HOT 5
- need to pause animation
- Pulsator has no member isReversed
- Swift 5 Support HOT 1
- Pulse is not centered to view HOT 1
- Swift Package Manager HOT 1
- Adding via SPM does not work in Xcode 11.3.1 HOT 2
- Drop support for iOS 8 HOT 1
- pulsator not show? HOT 2
- SwiftUI support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulsator.