gitmyhub

ViewAnimator

Swift ★ 7.3k updated 2y ago

ViewAnimator brings your UI to life with just one line

A Swift library for iOS and iPad apps that adds slide, zoom, and rotation animations to any UI element with a single line of code, including built-in spring bounce effects.

SwiftiOSCocoaPodsCarthagesetup: easycomplexity 2/5

ViewAnimator is a Swift library for iPhone and iPad app developers that makes it easy to add motion effects to parts of the user interface. With a single line of code, views on the screen can slide in from a direction, zoom in or out, or rotate into place, instead of appearing all at once.

The library works with standard iOS components: standalone views, tables (where content appears in scrollable rows), grid-like collection views (where items appear in a tiled layout), and stack views (where items are arranged in a line). Each of these can have their visible items animated individually or all at once, in one call.

Three animation types are built in. Direction-based animations make a view appear to fly in from any edge of the screen by a specified distance. Zoom animations scale a view up or down from a smaller or larger starting size. Rotation animations tilt a view around its center before it settles into position. These types can be combined freely, so a cell in a list could zoom in and slide from the right at the same time. A spring effect is included in the motion by default, giving animations a natural bounce rather than a mechanical stop.

Installation follows standard iOS library conventions. It can be added to a project through CocoaPods or Carthage (both are package management tools common in the iOS ecosystem), or the Swift files can be dropped into a project manually. The library requires iOS 8 or later and Swift 4.0.

Where it fits