Skip to content

artemlebedko/Moran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moran

Swift 4.2+ Platform iOS Version License

Overview

Simple custom transition demo

Installation

Usage

import Moran

var transition: Moran?

//when you presenting another view controller set delegate and presentation style
let storyboard = UIStoryboard.init(name: "Main", bundle: nil)
        if let detailViewController = storyboard.instantiateViewController(withIdentifier: "DetailViewController") as? DetailViewController {
            
            detailViewController.modalPresentationStyle = .custom
            detailViewController.transitioningDelegate = self.transition
            present(detailViewController, animated: true)
        }
        
//add element where animation will started
self.transition = Moran(animatedView: button, transitionDuration: 0.5)

You can change transitionDuration as you wish. Default value is 0.3 second.

Moran(animatedView: someViewToStart, transitionDuration: 0.1)

Author

Artem Lebedko, [email protected]

Special

Thanks to JTMaterialTransition! I referred a lot to this project.

License

Moran is available under the MIT license. See the LICENSE file for more info.

About

Custom transition like iOS main menu

Resources

License

Stars

Watchers

Forks

Packages

No packages published