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

Fixed Screen Width #12

Closed
wants to merge 1 commit into from
Closed

Conversation

Aniketsaoji
Copy link

Used to default to 0, which made the confetti fall from the left side of the screen.

@onmyway133
Copy link
Owner

Thanks for your PR, I've made a comment

@@ -16,7 +16,7 @@ public class CheerView: UIView {
stop()

let emitter = CAEmitterLayer()
emitter.emitterPosition = CGPoint(x: bounds.width / 2.0, y: 0)
emitter.emitterPosition = CGPoint(x: UIScreen.main.bounds.width / 2.0, y: 0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should prefer using bounds instead of UIScreen. Can you check that you have the correct frame size by the time you call start? Also, does it happen with the demo project?

@onmyway133 onmyway133 closed this Dec 10, 2017
@xta
Copy link

xta commented Feb 4, 2018

thanks @Aniketsaoji - your adjustment worked for me, and great work @onmyway133 ! 🎊

@onmyway133
Copy link
Owner

@xta Glad that you find it useful ❤️

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

Successfully merging this pull request may close these issues.

3 participants