• Stars
    star
    961
  • Rank 47,587 (Top 1.0 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An iOS transition for controllers based on material design.

JTMaterialTransition

CI Status Version License Platform

An iOS transition for controllers based on material design.

Installation

With CocoaPods, add this line to your Podfile.

pod 'JTMaterialTransition', '~> 2.0'

Screenshots

Example

Usage

Basic usage

import UIKit
import JTMaterialTransition

class ViewController: UIViewController {

    weak var presentControllerButton: UIButton?
    var transition: JTMaterialTransition?

    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.transition = JTMaterialTransition(animatedView: self.presentControllerButton)
    }
    
    func didPresentControllerButtonTouch () {
        let controller = SecondViewController()
        
        controller.modalPresentationStyle = .custom
        controller.transitioningDelegate = self.transition
        
        self.present(controller, animated: true, completion: nil)
    }

}

Notes

The animatedView is not directly used, a new view is created based on the frame, backgroundColor properties for the animation. If you don't want to provide a view, you have to set startFrame and startBackgroundColor properties and call init instead of initWithAnimatedView:.

startFrame must be the coordinates relative to the window:

var startFrame = animatedView.superview?.convert(animatedView.frame, to: nil)

Warning

The controller presented must have a backgroundColor else the effect can be a little strange. If you use a UINavigationController or another container don't forget to set the backgroundColor with controllerPresented.view.backgroundColor = UIColor.yourColor.

Requirements

  • iOS 8.0 or higher
  • Swift 4.2

Author

License

JTMaterialTransition is released under the MIT license. See the LICENSE file for more info.

More Repositories

1

JTCalendar

A customizable calendar view for iOS.
Objective-C
2,763
star
2

JT3DScrollView

ScrollView with custom effects during the scroll for iOS
Shell
491
star
3

JTHamburgerButton

An animated hamburger button for iOS.
Objective-C
350
star
4

JTNumberScrollAnimatedView

A scroll animation for display number for iOS
Objective-C
207
star
5

JTMaterialSpinner

An iOS material design spinner view
Swift
129
star
6

JTSlideShadowAnimation

A shadow animation effect for iOS
Objective-C
88
star
7

JTImageLabel

JTImageLabel keeps a UILabel and a UIImageView side by side on iOS.
Objective-C
79
star
8

JTTableViewController

A ViewController for manage pagination and loaders for iOS.
Swift
61
star
9

JTBorderDotAnimation

A simple animation with dots turning around a UIView for iOS
Objective-C
56
star
10

flutter_cast

Dart package to discover and connect with Chromecast devices
Dart
42
star
11

jt-rails-address

Postal addresses management in Ruby On Rails and Javascript
Ruby
41
star
12

JTScrollViewController

Create a ScrollViewController on iOS pragmatically using Auto Layout without a nib file.
Objective-C
31
star
13

flutter_brother_printer

Objective-C
11
star
14

jt-translator-ios

Remotely manage your translations on iOS
Swift
8
star
15

spotify-playlist

Remove the songs added to the playlist "Remove from spotify" from every playlists
Ruby
6
star
16

BRLMPrinterKit

Pod for the BRLMPrinterKit / Brother's printers
Objective-C
4
star
17

jt-rails-generator-user

Generate a scaffold for user authentication in Ruby On Rails.
Ruby
4
star
18

JTHelper

List of common helpers for iOS projects
Objective-C
3
star
19

SUPINFO-B3-iOS

Objective-C
3
star
20

jt-rails-meta

Manage HTML meta tags for SEO in Ruby On Rails
Ruby
3
star
21

vagrant-rails-dev

Vagrant file for Ruby On Rails development
Shell
3
star
22

jt-rails-toolbox

Common libs used for Ruby On Rails development.
Ruby
2
star
23

paperclip-storage-http

HTTP storage support for paperclip.
Ruby
2
star
24

base-static-site

Base scaffold for simple static website using compression and minification
Shell
2
star
25

jt-rails-tokenizable

Token generation for ActiveRecord models in Ruby On Rails
Ruby
2
star
26

chrome-password-reminder

Chrome extension password reminder
JavaScript
2
star
27

omniauth-gocardless-oauth2

OmniAuth Strategy for GoCardless via OAuth2
Ruby
2
star
28

flutter_socket_mobile

Java
1
star