Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial position for confetti #20

Open
HarshilShah opened this issue Aug 9, 2016 · 4 comments
Open

Initial position for confetti #20

HarshilShah opened this issue Aug 9, 2016 · 4 comments

Comments

@HarshilShah
Copy link

Is it possible to have the confetti drop in from the top when starting? Calling startConfetti() right now just shows a screen with a lot of confetti in random positions, which is pretty jarring. New confetti appear from the top after that, so it would be cool if they initially had the same origin.

@HarshilShah
Copy link
Author

Okay I did some digging around and turns out if you modify the lifetime of the emitter and not the birthrate for starting and stopping, this behaves as I’m proposing.

@saulacher
Copy link

It is possible, just set emitter.emitterShape = kCAEmitterLayerLine and confetti will start drop from the top.

@GeorgeFedoseev
Copy link

For me the solution was adding

    emitter.beginTime = CACurrentMediaTime();

to the startConfetti() method

@sssbohdan
Copy link

For me after adding emitter.beginTime = CACurrentMediaTime();animation started behave really weird and working one in three/five times. In general, it seems bug by Apple, because before iOS 7 emitter was always starting from the initial position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants