Skip to content

kaka21garuda/NSDesign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSDesign for iOS

NSDesign is animation library that contains ready to use of animation classes. Check out the animations below and Enjoy!


Table of Contents


How to use it

Circular Transition

Goal: create A circle transition from one view into another

  • Drag and drop CircularTransition.swift into your project.

  • Use UIViewControllerTransitioningDelegate in your initial ViewController

  • Make an object of CircularTransition

  • add these functions to conform the protocol

    func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {

        transition.transitionMode = .present
        transition.startingPoint = (buttonSender?.center)!
        transition.circleColor = (buttonSender?.backgroundColor)!

        return transition
    }

    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {

        transition.transitionMode = .dismiss
        transition.startingPoint = (buttonSender?.center)!
        transition.circleColor = (buttonSender?.backgroundColor)!

        return transition
    }
  • Go to prepare for segue to set delegate to self:
     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
     if segue.identifier == "segueID" {
         let destinationViewController: DestinationViewController = segue.destination as! DestinationViewController
         destinationViewController.transitioningDelegate = self
         destinationViewController.modalPresentationStyle = .custom
     }
 }
  • For any reference, your can checkout the sample project: ViewController.swift and DestinationViewController.swift

Loading animation

  • Drag and drop SkillLoaderView.swift
  • Subclass your view with SkillLoaderView
  • Modify the animation as you wish from the storyboard

Back to top ^


Contributing or Feature Request

Contributors are more than welcome. NSDesign accepts any kind of great animation in Swift. Just upload a pull request and add a description on your changes you made.

Feel free to add any issue and feature request to make NSDesign better in the future.

Releases

No releases published

Packages

No packages published

Languages