Commit 78163a30 by Daniel Dahan

development: preparation for Material 2.3.12 release

parent 9ad1b5cc
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '2.3.11'
s.version = '2.3.12'
s.license = 'BSD-3-Clause'
s.summary = 'Material is an animation and graphics framework that is used to create beautiful applications.'
s.homepage = 'http://materialswift.com'
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.3.11</string>
<string>2.3.12</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -52,7 +52,7 @@ extension UIViewController {
open class CaptureController: ToolbarController {
/// A reference to the Capture instance.
@IBInspectable
open private(set) var capture = Capture()
open fileprivate(set) var capture = Capture()
open override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return UIInterfaceOrientationMask.portrait
......
......@@ -37,7 +37,7 @@ open class Card: PulseView {
}
/// A container view for subviews.
open private(set) var container = UIView()
open fileprivate(set) var container = UIView()
@IBInspectable
open override var cornerRadiusPreset: CornerRadiusPreset {
......
......@@ -52,7 +52,7 @@ extension UIViewController {
open class EditorController: ToolbarController {
/// A reference to the Editor instance.
@IBInspectable
open private(set) var editor = Editor()
open fileprivate(set) var editor = Editor()
/**
Prepares the view instance when intialized. When subclassing,
......
......@@ -268,6 +268,12 @@ extension CALayer {
} else if let a = animation as? CATransition {
add(a, forKey: kCATransition)
}
if #available(iOS 10, *) {
Motion.delay(time: animation.duration) { [weak self, animation = animation] in
self?.animationDidStop(animation, finished: true)
}
}
}
/**
......@@ -279,20 +285,29 @@ extension CALayer {
if interrupted.
*/
open func animationDidStop(_ animation: CAAnimation, finished flag: Bool) {
if let a = animation as? CAPropertyAnimation {
if let b = a as? CABasicAnimation {
if let v = b.toValue {
if let k = b.keyPath {
setValue(v, forKeyPath: k)
removeAnimation(forKey: k)
}
guard let a = animation as? CAPropertyAnimation else {
if let a = (animation as? CAAnimationGroup)?.animations {
for x in a {
animationDidStop(x, finished: true)
}
}
} else if let a = animation as? CAAnimationGroup {
for x in a.animations! {
animationDidStop(x, finished: true)
}
return
}
guard let b = a as? CABasicAnimation else {
return
}
guard let v = b.toValue else {
return
}
guard let k = b.keyPath else {
return
}
setValue(v, forKeyPath: k)
removeAnimation(forKey: k)
}
/// Manages the layout for the shape of the view instance.
......
......@@ -50,7 +50,7 @@ extension UIViewController {
open class MenuController: RootController {
/// Reference to the MenuView.
open private(set) var menu = Menu()
open fileprivate(set) var menu = Menu()
/**
Opens the menu with a callback.
......
......@@ -32,10 +32,10 @@ import UIKit
open class MenuItem: View {
/// A reference to the titleLabel.
open private(set) var titleLabel = UILabel()
open fileprivate(set) var titleLabel = UILabel()
/// A reference to the button.
open private(set) var button = FabButton()
open fileprivate(set) var button = FabButton()
/**
Prepares the view instance when intialized. When subclassing,
......
......@@ -71,6 +71,8 @@ public enum AnimationTimingFunction: Int {
*/
public func AnimationTimingFunctionToValue(function: AnimationTimingFunction) -> CAMediaTimingFunction {
switch function {
case .default:
return CAMediaTimingFunction(name: kCAMediaTimingFunctionDefault)
case .linear:
return CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
case .easeIn:
......@@ -79,8 +81,6 @@ public func AnimationTimingFunctionToValue(function: AnimationTimingFunction) ->
return CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
case .easeInEaseOut:
return CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
case .default:
return CAMediaTimingFunction(name: kCAMediaTimingFunctionDefault)
}
}
......
......@@ -307,7 +307,7 @@ extension Motion {
- Parameter duration: An animation time duration.
- Returns: A CABasicAnimation.
*/
public static func translation(size: CGSize, duration: CFTimeInterval? = nil) -> CABasicAnimation {
public static func translate(size: CGSize, duration: CFTimeInterval? = nil) -> CABasicAnimation {
let animation = CABasicAnimation(keyPath: .translation)
animation.toValue = NSValue(cgSize: size)
animation.fillMode = AnimationFillModeToValue(mode: .forwards)
......@@ -327,7 +327,7 @@ extension Motion {
- Parameter duration: An animation time duration.
- Returns: A CABasicAnimation.
*/
public static func translationX(by translation: CGFloat, duration: CFTimeInterval? = nil) -> CABasicAnimation {
public static func translateX(by translation: CGFloat, duration: CFTimeInterval? = nil) -> CABasicAnimation {
let animation = CABasicAnimation(keyPath: .translationX)
animation.toValue = translation as NSNumber
animation.fillMode = AnimationFillModeToValue(mode: .forwards)
......@@ -347,7 +347,7 @@ extension Motion {
- Parameter duration: An animation time duration.
- Returns: A CABasicAnimation.
*/
public static func translationY(by translation: CGFloat, duration: CFTimeInterval? = nil) -> CABasicAnimation {
public static func translateY(by translation: CGFloat, duration: CFTimeInterval? = nil) -> CABasicAnimation {
let animation = CABasicAnimation(keyPath: .translationY)
animation.toValue = translation as NSNumber
animation.fillMode = AnimationFillModeToValue(mode: .forwards)
......@@ -367,7 +367,7 @@ extension Motion {
- Parameter duration: An animation time duration.
- Returns: A CABasicAnimation.
*/
public static func translationZ(by translation: CGFloat, duration: CFTimeInterval? = nil) -> CABasicAnimation {
public static func translateZ(by translation: CGFloat, duration: CFTimeInterval? = nil) -> CABasicAnimation {
let animation = CABasicAnimation(keyPath: .translationZ)
animation.toValue = translation as NSNumber
animation.fillMode = AnimationFillModeToValue(mode: .forwards)
......
......@@ -143,7 +143,7 @@ public protocol NavigationDrawerControllerDelegate {
}
@objc(NavigationDrawerController)
open class NavigationDrawerController: RootController, UIGestureRecognizerDelegate {
open class NavigationDrawerController: RootController {
/**
A CGFloat property that is used internally to track
the original (x) position of the container view when panning.
......@@ -1075,7 +1075,7 @@ extension NavigationDrawerController {
}
}
extension NavigationDrawerController {
extension NavigationDrawerController: UIGestureRecognizerDelegate {
/**
Detects the gesture recognizer being used.
- Parameter gestureRecognizer: A UIGestureRecognizer to detect.
......
......@@ -101,7 +101,7 @@ public protocol PageTabBarControllerDelegate {
@objc(PageTabBarController)
open class PageTabBarController: RootController {
/// Reference to the PageTabBar.
open private(set) var pageTabBar = PageTabBar()
open fileprivate(set) var pageTabBar = PageTabBar()
/// A boolean that indicates whether bounce is enabled.
open var isBounceEnabled: Bool {
......
......@@ -50,7 +50,7 @@ extension UIViewController {
open class PhotoLibraryController: UIViewController {
/// A reference to a PhotoLibrary.
open private(set) var photoLibrary = PhotoLibrary()
open fileprivate(set) var photoLibrary = PhotoLibrary()
open override func viewDidLoad() {
super.viewDidLoad()
......
......@@ -62,10 +62,10 @@ public protocol SearchBarDelegate {
open class SearchBar: Bar {
/// The UITextField for the searchBar.
open private(set) var textField = UITextField()
open fileprivate(set) var textField = UITextField()
/// Reference to the clearButton.
open private(set) var clearButton: IconButton!
open fileprivate(set) var clearButton: IconButton!
/// A reference to the delegate.
open weak var delegate: SearchBarDelegate?
......
......@@ -61,7 +61,7 @@ open class SearchBarController: StatusBarController {
}
/// Reference to the SearchBar.
open private(set) var searchBar = SearchBar()
open fileprivate(set) var searchBar = SearchBar()
open override func layoutSubviews() {
super.layoutSubviews()
......
......@@ -91,7 +91,7 @@ extension UIViewController {
open class SnackbarController: RootController {
/// Reference to the Snackbar.
open private(set) var snackbar = Snackbar()
open fileprivate(set) var snackbar = Snackbar()
/// A boolean indicating if the Snacbar is animating.
open internal(set) var isAnimating = false
......
......@@ -50,7 +50,7 @@ extension UIViewController {
open class StatusBarController: RootController {
/// A reference to the statusBar.
open private(set) var statusBar = UIView()
open fileprivate(set) var statusBar = UIView()
/// A boolean that indicates to hide the statusBar on rotation.
open var shouldHideStatusBarOnRotation = true
......
......@@ -159,14 +159,14 @@ open class Switch: UIControl {
}
/// Track view reference.
open private(set) var track: UIView {
open fileprivate(set) var track: UIView {
didSet {
prepareTrack()
}
}
/// Button view reference.
open private(set) var button: FabButton {
open fileprivate(set) var button: FabButton {
didSet {
prepareButton()
}
......
......@@ -186,7 +186,7 @@ open class TextField: UITextField {
/// The placeholder UILabel.
@IBInspectable
open private(set) var placeholderLabel = UILabel()
open fileprivate(set) var placeholderLabel = UILabel()
/// Placeholder normal text
@IBInspectable
......@@ -210,7 +210,7 @@ open class TextField: UITextField {
/// The detailLabel UILabel that is displayed.
@IBInspectable
open private(set) var detailLabel = UILabel()
open fileprivate(set) var detailLabel = UILabel()
/// The detailLabel text value.
@IBInspectable
......@@ -253,7 +253,7 @@ open class TextField: UITextField {
}
/// A reference to the clearIconButton.
open private(set) var clearIconButton: IconButton?
open fileprivate(set) var clearIconButton: IconButton?
/// Enables the clearIconButton.
@IBInspectable
......@@ -299,7 +299,7 @@ open class TextField: UITextField {
}
/// A reference to the visibilityIconButton.
open private(set) var visibilityIconButton: IconButton?
open fileprivate(set) var visibilityIconButton: IconButton?
/// Enables the visibilityIconButton.
@IBInspectable
......
......@@ -81,7 +81,7 @@ open class ToolbarController: StatusBarController {
}
/// Reference to the Toolbar.
open private(set) var toolbar = Toolbar()
open fileprivate(set) var toolbar = Toolbar()
/// Internal reference to the floatingViewController.
private var internalFloatingViewController: UIViewController?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment