Skip to content

🍏 A Swift package providing animated UI components for iOS, including buttons, table views, and collection views.

License

Notifications You must be signed in to change notification settings

lymanny/iOS-AnimatedComponentsLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AnimatedComponentsLib πŸš€

A collection of animated UI components for iOS, including buttons, table views, and collection views, designed to enhance user experiences with dynamic and engaging animations.

Features ✨

  1. Animated Buttons
    • Add interactive animations to your buttons with ease, such as pulsating, bouncing, or scaling effects.
  2. Animated Table Views
    • Customize animations for table view rows, including sliding, fading, and jiggle effects.
  3. Animated Collection Views
    • Customize animations for collection view items, including shake, swing, and jiggle effects.

Requirements πŸ“‹

  • iOS 14.0+
  • Swift 5.0+
  • Xcode 12.0+

Components πŸ“¦

This library integrates the following sub-libraries:

Installation πŸ› οΈ

AnimatedComponentsLib is available via Swift Package Manager (SPM).

Step 1: Add the Package Dependency

In your Xcode project, go to File > Add Packages, and add the following URL:

https://github.com/lymanny/iOS-AnimatedComponentsLib.git

Select the version you want and add it to your project.

Step 2: Import the Library

import AnimatedComponents

Usage πŸ“–

Animated Buttons

@IBAction func btnClick(_ sender: UIButton) {
    sender.press {
        print("Button Pressed!")
    }
}

Animated Table Views

In your UITableView's cellForRowAt method:

cell.animateFlip(delay: 0.05 * Double(indexPath.row)) {
    print("Animation completed for row \(indexPath.row)")
}

In your UITableView's didSelectRowAt method:

if let cell = tableView.cellForRow(at: indexPath) {
    cell.animateJiggle {
        print("Jiggle animation completed for row \(indexPath.row)")
    }
}

Animated Collection Views

In your UICollectionView's cellForItemAt method:

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath)
    
    // Apply an animation
    cell.animateShake {
        print("Animation done for cell at \(indexPath)")
    }
    
    return cell
}

Contributing 🀝

Contributions are welcome! Please feel free to submit issues, fork the repository, and create pull requests.

License πŸ“„

This project is licensed under the MIT License.

Author πŸ‘©β€πŸ’»

lymanny - iOS Developer
🌐 Portfolio

About

🍏 A Swift package providing animated UI components for iOS, including buttons, table views, and collection views.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages