Commit 414b7820 by Daniel Dahan

issue-450: Fixed issue where initializers were missing the prepareView call

parent aa98b4dc
......@@ -116,8 +116,9 @@ extension AppLeftViewController: UITableViewDelegate {
if let v: NavigationController = navigationDrawerController?.rootViewController as? NavigationController {
switch item.text {
case "Orange":
navigationDrawerController?.transitionFromRootViewController(OrangeViewController())
// navigationDrawerController?.transitionFromRootViewController(OrangeViewController())
// v.pushViewController(OrangeViewController(), animated: true)
navigationDrawerController?.transitionFromRootViewController(NavigationController(rootViewController: OrangeViewController()))
case "Purple":
v.pushViewController(PurpleViewController(), animated: true)
case "Green":
......
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '1.42.2'
s.version = '1.42.3'
s.license = 'BSD-3-Clause'
s.summary = 'An animation and graphics framework for Material Design in Swift.'
s.homepage = 'http://cosmicmind.io'
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.42.2</string>
<string>1.42.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -69,6 +69,7 @@ public class BottomNavigationController : UITabBarController, UITabBarController
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......@@ -78,6 +79,7 @@ public class BottomNavigationController : UITabBarController, UITabBarController
*/
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
prepareView()
}
public init() {
......
......@@ -184,6 +184,7 @@ public class BottomTabBar : UITabBar {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -318,6 +318,7 @@ public class MaterialButton : UIButton {
public required init?(coder aDecoder: NSCoder) {
contentEdgeInsetsPreset = .None
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -420,6 +420,7 @@ public class MaterialCollectionReusableView : UICollectionReusableView {
shape = .None
contentsGravityPreset = .ResizeAspectFill
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -124,6 +124,7 @@ public class MaterialCollectionView : UICollectionView {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -420,6 +420,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
shape = .None
contentsGravityPreset = .ResizeAspectFill
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -116,6 +116,7 @@ public class MaterialLabel : UILabel {
wrapped = true
contentsScale = MaterialDevice.scale
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -254,6 +254,7 @@ public class MaterialLayer : CAShapeLayer {
public override init(layer: AnyObject) {
contentsGravityPreset = .ResizeAspectFill
super.init()
prepareVisualLayer()
}
/// A convenience initializer.
......
......@@ -46,6 +46,7 @@ public enum MaterialSwitchSize {
case Large
}
@objc(MaterialSwitchDelegate)
public protocol MaterialSwitchDelegate {
/**
A MaterialSwitch delegate method for state changes.
......@@ -54,6 +55,7 @@ public protocol MaterialSwitchDelegate {
func materialSwitchStateChanged(control: MaterialSwitch)
}
@objc(MaterialSwitch)
@IBDesignable
public class MaterialSwitch : UIControl {
/// An internal reference to the switchState public property.
......@@ -115,7 +117,7 @@ public class MaterialSwitch : UIControl {
}
/// An Optional delegation method.
public var delegate: MaterialSwitchDelegate?
public weak var delegate: MaterialSwitchDelegate?
/// Indicates if the animation should bounce.
@IBInspectable public var bounceable: Bool = true {
......
......@@ -281,6 +281,7 @@ public class MaterialTableViewCell : UITableViewCell {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -364,6 +364,7 @@ public class MaterialView : UIView {
public required init?(coder aDecoder: NSCoder) {
contentsGravityPreset = .ResizeAspectFill
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -268,6 +268,7 @@ public class NavigationBar : UINavigationBar {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -272,7 +272,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
A Boolean property that triggers the status bar to be hidden
when the leftView is opened. Defaults to true.
*/
@IBInspectable public var enableHideStatusbar: Bool = true
@IBInspectable public var enableHideStatusBar: Bool = true
/// Sets the statusBar to hidden or not.
public private(set) var statusBarHidden: Bool = false
......@@ -1042,7 +1042,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
/// Hides the statusBar.
private func hideStatusBar() {
if enableHideStatusbar {
if enableHideStatusBar {
if !statusBarHidden {
statusBarHidden = true
dispatch_async(dispatch_get_main_queue(), { [weak self] in
......
......@@ -69,6 +69,7 @@ public class RootController : UIViewController {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......@@ -78,6 +79,7 @@ public class RootController : UIViewController {
*/
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
prepareView()
}
/**
......
......@@ -338,6 +338,7 @@ public class TextField : UITextField {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......
......@@ -305,6 +305,7 @@ public class TextView: UITextView {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
......
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