sudeepag / saconfettiview Goto Github PK
View Code? Open in Web Editor NEWConfetti! Who doesn't like confetti?
License: MIT License
Confetti! Who doesn't like confetti?
License: MIT License
Hi,
I just noticed that the emitter cells are not visible if you push a controller with the confetti view in a navigation controller and use the swipe back gesture. If you use the back button to pop the controller everything is fine.
Do you have any idea why?
Thanks!
Here is my code.
UIGraphicsBeginImageContextWithOptions(editingView.bounds.size, NO, 0.0);
[editingView drawViewHierarchyInRect:editingView.bounds afterScreenUpdates:NO];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
if i write like this, I am miss snapshot data. If I replace afterScreenUpdates is YES screen is blinking and updating. even i didn't get my desire output. can any one help me on this issue.?
Also i wrote a function to have the confetti run on a timer.
Just a heads up that someone just ripped this library. You can find the repository at https://github.com/ugurethemaydin/SwiftConfettiView
This library is still running on the old Swift code. Please be sure to update the code compatible for new Xcode.
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.
With xcode 8.3 and Swift 3.1 there are two minor build errors that need to be fixed as M_PI and M_PI_4 are deprecated.
In SAConfettiView.swift simply update:
confetti.emissionLongitude = CGFloat(M_PI)
confetti.emissionRange = CGFloat(M_PI_4)
to:
confetti.emissionLongitude = CGFloat(Double.pi)
confetti.emissionRange = CGFloat(Double.pi/4)
Getting this error on iPhone 5 & 4S; non-64 bit devices. Using Cocoapods.
Undefined symbols for architecture i386:
"SAConfettiView.SAConfettiView.__allocating_init (SAConfettiView.SAConfettiView.Type)(frame : __C.CGRect) -> SAConfettiView.SAConfettiView", referenced from:
AppName.FirstViewController.(functionName (AppName.FirstViewController) -> (Swift.Int, showBigIndicator : Swift.Bool) -> ()).(closure #1).(closure #1) in FirstViewController.o
"type metadata accessor for SAConfettiView.SAConfettiView", referenced from:
AppName.FirstViewController.(functionName (AppName.FirstViewController) -> (Swift.Int, showBigIndicator : Swift.Bool) -> ()).(closure #1).(closure #1) in FirstViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Just wondering when you would be Swift 3 ready. I'd love to help if you are too busy to update this Cocoapod.
Please consider carthage compatibility
Maybe better to use the view width instead of the view x position for the emitter position.
Because with the x position there is a bug when the confettiView is add in a scrollview.
Update to 4.2 please.
let path = NSBundle(forClass: SAConfettiView.self).pathForResource("SAConfettiView", ofType: "bundle")
let bundle = NSBundle(path: path!)
the path is nil so the unwrapping crashes. I add the SAConfettiView.swift manually into my project.
I added
super.userInteractionEnabled = false
to init to fix the problem
Thanks for your great work!
I added the SAConfettiView.swift to my project manually but when i run it the screen freezes on me.. i have it setup in a segmented control so i only want the animation to show up in one of the 3 tabs in my segmented control. any idea?
Hello
I am using this pod from an Obj-C project. Everything fine but I cannot access two public properties and I do not know why.
Here they are:
public var intensity: Float!
public var type: ConfettiType!
Could you please help me?
Thanks.
I was facing issue with build fail in SAConfettiView framework version 0.1.8.
Please help me to fix this issue
Thanks
You have to change the get image method because it doesn't support your bundle.... I fixed it but still.
how to fix?
Time to merge the Swift 3 pull request :)
let path = Bundle.main.path(forResource: "SAConfettiView", ofType: "bundle")
let bundle = Bundle(path: path!)
How do I fix this!?
Thanks for this awesome library that even comes with great default images.
Could you please add retina images for the confetti, diamond, star and triangle assets?
Hello! I love this effect–great job! I use this pod In my Obj-C app, and when I call
[_confettiView stopConfetti];
The confetti doesn't stop. I tried putting it in viewDidLoad, but it still didn't work. Any ideas? Thank you!
Not sure the status on maintaining this pod, I moved it over to work on swift 4. I am willing to spend more time on it if there is interest.
I removed everything that was force unwrapped and made code changes.
If I am using a custom image, which has it's own colors already, is there a way to prevent adding colors on top of that?
If I use clear color it is invisible. If I use an empty array it is also invisible.
Would you like to update cocoapods
Even if it corresponds to swift 4 as it is, it can not be used with cocoapods.
It looks like the changes for Swift 4 compatibility have been merged in a PR, but right now running pod install
will result in version 0.1.8 being installed, which doesn't have the Swift 4 compatibility.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.