stevebarnegren / tweenkit Goto Github PK
View Code? Open in Web Editor NEWAnimation library for iOS in Swift
License: MIT License
Animation library for iOS in Swift
License: MIT License
Is it possible to somehow make a loop of those swipe animations in onboarding?
So that a user could swipe it without necessity to swipe back.
Thanks for quick response Steve on previous ticket.
Heads up - I made a lot of progress on my view rotating label.
Here's a peak.
https://drive.google.com/file/d/0B-w3I-xzXGu0eFZhTnVLaGNYS3c/view
a couple things from stand point of consuming the library
not sure if you play chess - but I need a way to have some action in between actions.
I looked into the scheduleAction but there was no blocks to inject some method.
perhaps you could consider down the track adding such an ZwischenzugAction ? or exposing a block on ScheduledAction or document if it's already possible?.
I see there's a repeat method for actions. -
I couldn't see how to do this on a sequence.
from my code class above
I have this class
https://gist.github.com/johndpope/4897dc5070abce8637886fe9310b9b1b#file-gistfile1-txt-L88
on last line - I simply want to call
let cycleSequence = ActionSequence(actions: moveLeft,bankLabelRight,cycleLeftAgain )
scheduler.run(action: cycleSequence , repeat: forever) // <- keep looping
Is it possible with this library to create an animation from one path value to another, like with CABasicAnimation
, but unlike CABasicAnimation
make it scrubbable?
Thank you for the work! The animation seems very easy to do!
In the examples, how can I change the sequence of the animations? Tried to edit this in the OnboardingExampleViewController but it still doesn't change which animation comes first and so on. Pointers will be very appreciated!
return ActionGroup(actions:
[introAction,
rocketAction,
starsAction,
makeClockAction(),
makeTkAttributesAction(),
makeBackgroundColorsAction()]
)
Hi. Is it possible to add or use custom easing functions?
I used to use this library in objective-c days
https://github.com/danielebogo/PRTween
Perhaps you could cherry pick helpful stuff.
I want to hook into a value that gets updated.
I want to have a ticker style uilabel that rotates when the length is too long.
I'm using snapkit through out project / thus far code looks like this (not full functional)
I want my label's left offset to change over a duration. eg.
UIView.animate(
withDuration:5.0,
delay: 0.0,
options: [UIViewAnimationOptions.curveLinear, UIViewAnimationOptions.beginFromCurrentState, UIViewAnimationOptions.repeat],
animations: {
self.labelXoffset = 45 // want a way to hook into a tween value.
self.label.snp.updateConstraints { (make) -> Void in
make.left.equalTo(self.labelXoffset)
}
},
completion: { _ in
})
https://gist.github.com/johndpope/5eef5fab18ad20b467b8da81032fa83f
Wondering if there is a way to combine the scheduler and scrubber.
While implementing a "snap" animation, I came across a minor issue. I'd like to prevent a new snap animation from being scheduled before the previous has finished. I simply cancel the previous animation when scheduling a new one:
if let snapAnim = snapAnim
{
tkScheduler.remove(animation: snapAnim)
}
However, if the animation has already played out, I get an error in console: "Can't find animation to remove". It would be convenient if I could check to see if the scheduler already contains an animation in order to avoid the message. Not sure if you'd rather expose the animations
property or implement a contains
method. I can do either.
Hey @SteveBarnegren your probably the perfect person to ask for this. Im using a UIPageViewController library (Tabman) to create a UI to swipe between pages where the NavBarItems animate between page swipes with ease-In functions to create a fluid feel like the example below from the app "tbh app". I have a repo I'm working with to replicate this found here. Technically in my example I use a UIView with UIButtons as Im not sure UIBarButtonItem positions can be animated
So far Im failing because it involves animating each barItem with ease-In functions and would like to get your thoughts on how I can leverage TweenKit to achieve this.
Hello!
Is it possible to add tap gesture in on-boarding?
So that user could go to the next screen not only with swipe but also with tap (come back to the previous screen only with swipe, obviously).
Thank you.
@SteveBarnegren
This library looks super powerful. Based on how you animated the String by having "String" inherit tweenable
protocol, I'm wondering if more complex objects such as UIImageViews
can be animated?
SDK version: TweenKit (1.0.1)
issue: Some iphone devices crashed report from Xcode-Window-Organizer-Crashes.
iOS version: 13.1.3,13.3,13.4.1,13.6,13.6.1,14.0 etc.
Screenshot is like below:
It is like that crashes happened at
let repeatNumber = Int(elapsedTime / action.duration)
So is it possible action.duration
to be equal to zero? or other reasons?
I can not figure it out temporarily, hope you can help.
Thank you very much.
👋
Hey! Appreciate Xcode 11 has only just been published into beta but getting this in early so that when Xcode 11 is released it's not a surprise or last minute job for anyone :)
Xcode 11 has incredible support for Swift Package Manager, including for iOS projects, and people will be expecting to replace pods with Packages. From what I can see it doesn't look like TweenKit yet supports SPM (which is expected because SPM was never officially supported for iOS until now), so would be good to start thinking about it.
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.