diff --git a/.swift-version b/.swift-version
index 5186d07..6aba2b2 100644
--- a/.swift-version
+++ b/.swift-version
@@ -1 +1 @@
-4.0
+4.2.0
diff --git a/DrawerController.podspec b/AMDrawerController.podspec
similarity index 64%
rename from DrawerController.podspec
rename to AMDrawerController.podspec
index 6787bad..7802e0c 100644
--- a/DrawerController.podspec
+++ b/AMDrawerController.podspec
@@ -1,16 +1,16 @@
Pod::Spec.new do |s|
- s.name = 'DrawerController'
- s.version = '4.0.0'
+ s.name = 'AMDrawerController'
+ s.version = '4.2.4'
s.license = { :type => 'MIT', :file => 'LICENSE' }
- s.homepage = 'https://github.com/sascha/DrawerController'
+ s.homepage = 'https://github.com/Anumothu/DrawerController'
s.authors = { 'Sascha Schwabbauer' => 'sascha@evolved.io',
- 'Malte Baumann' => 'malte@codingdivision.com' }
+ 'Malte Baumann' => 'malte@codingdivision.com','Alen' => 'alenbala11@gmail.com' }
s.summary = 'A lightweight, easy-to-use side drawer navigation controller (Swift port of MMDrawerController).'
s.social_media_url = 'http://twitter.com/_saschas'
- s.source = { :git => 'https://github.com/sascha/DrawerController.git', :tag => s.version.to_s }
+ s.source = { :git => 'https://github.com/Anumothu/DrawerController.git', :tag => s.version.to_s }
s.requires_arc = true
- s.ios.deployment_target = '8.0'
+ s.ios.deployment_target = '9.0'
s.subspec 'Core' do |ss|
ss.source_files = 'DrawerController/DrawerController.swift', 'DrawerController/DrawerSegue.swift'
@@ -19,6 +19,6 @@ Pod::Spec.new do |s|
s.subspec 'DrawerVisualStates' do |ss|
ss.source_files = 'DrawerController/DrawerBarButtonItem.swift', 'DrawerController/AnimatedMenuButton.swift', 'DrawerController/DrawerVisualState.swift'
- ss.dependency 'DrawerController/Core'
+ ss.dependency 'AMDrawerController/Core'
end
end
diff --git a/DrawerController.xcodeproj/project.pbxproj b/DrawerController.xcodeproj/project.pbxproj
index d8a745e..8da4ed6 100644
--- a/DrawerController.xcodeproj/project.pbxproj
+++ b/DrawerController.xcodeproj/project.pbxproj
@@ -291,7 +291,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -312,7 +312,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 4.2;
};
name = Release;
};
diff --git a/DrawerController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DrawerController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/DrawerController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/DrawerController/AnimatedMenuButton.swift b/DrawerController/AnimatedMenuButton.swift
index e9ca7e7..49cf9e0 100644
--- a/DrawerController/AnimatedMenuButton.swift
+++ b/DrawerController/AnimatedMenuButton.swift
@@ -69,7 +69,7 @@ open class AnimatedMenuButton : UIButton {
layer.strokeColor = self.strokeColor.cgColor
layer.lineWidth = 1
layer.miterLimit = 2
- layer.lineCap = kCALineCapSquare
+ layer.lineCap = CAShapeLayerLineCap.square
layer.masksToBounds = true
if let path = layer.path, let strokingPath = CGPath(__byStroking: path, transform: nil, lineWidth: 1, lineCap: .square, lineJoin: .miter, miterLimit: 4) {
@@ -147,7 +147,7 @@ open class AnimatedMenuButton : UIButton {
let topTransform = CABasicAnimation(keyPath: "transform")
topTransform.timingFunction = CAMediaTimingFunction(controlPoints: 0.5, -0.8, 0.5, 1.85)
topTransform.duration = animationDuration
- topTransform.fillMode = kCAFillModeBackwards
+ topTransform.fillMode = CAMediaTimingFillMode.backwards
let bottomTransform = topTransform.copy() as! CABasicAnimation
diff --git a/DrawerController/DrawerBarButtonItem.swift b/DrawerController/DrawerBarButtonItem.swift
index f6dfb10..b0159f4 100755
--- a/DrawerController/DrawerBarButtonItem.swift
+++ b/DrawerController/DrawerBarButtonItem.swift
@@ -44,7 +44,7 @@ open class DrawerBarButtonItem: UIBarButtonItem {
public convenience init(target: AnyObject?, action: Selector, menuIconColor: UIColor, animatable: Bool) {
let menuButton = AnimatedMenuButton(frame: CGRect(x: 0, y: 0, width: 26, height: 26), strokeColor: menuIconColor)
menuButton.animatable = animatable
- menuButton.addTarget(target, action: action, for: UIControlEvents.touchUpInside)
+ menuButton.addTarget(target, action: action, for: UIControl.Event.touchUpInside)
self.init(customView: menuButton)
self.menuButton = menuButton
diff --git a/DrawerController/DrawerController.swift b/DrawerController/DrawerController.swift
index 81cc813..c188214 100644
--- a/DrawerController/DrawerController.swift
+++ b/DrawerController/DrawerController.swift
@@ -76,7 +76,7 @@ private func bounceKeyFrameAnimation(forDistance distance: CGFloat, on view: UIV
let animation = CAKeyframeAnimation(keyPath: "position.x")
animation.repeatCount = 1
animation.duration = 0.8
- animation.fillMode = kCAFillModeForwards
+ animation.fillMode = CAMediaTimingFillMode.forwards
animation.values = values
animation.isRemovedOnCompletion = true
animation.autoreverses = false
@@ -543,11 +543,11 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
// MARK: - UIViewController Containment
- override open var childViewControllerForStatusBarHidden : UIViewController? {
+ override open var childForStatusBarHidden : UIViewController? {
return self.childViewController(for: self.openSide)
}
- override open var childViewControllerForStatusBarStyle : UIViewController? {
+ override open var childForStatusBarStyle : UIViewController? {
return self.childViewController(for: self.openSide)
}
@@ -704,7 +704,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
}
if let sideDrawerViewControllerToHide = self.sideDrawerViewController(for: drawerToHide) {
- self.childControllerContainerView.sendSubview(toBack: sideDrawerViewControllerToHide.view)
+ self.childControllerContainerView.sendSubviewToBack(sideDrawerViewControllerToHide.view)
sideDrawerViewControllerToHide.view.isHidden = true
}
@@ -844,11 +844,11 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
currentSideViewController!.beginAppearanceTransition(false, animated: false)
currentSideViewController!.view.removeFromSuperview()
currentSideViewController!.endAppearanceTransition()
- currentSideViewController!.willMove(toParentViewController: nil)
- currentSideViewController!.removeFromParentViewController()
+ currentSideViewController!.willMove(toParent: nil)
+ currentSideViewController!.removeFromParent()
}
- var autoResizingMask = UIViewAutoresizing()
+ var autoResizingMask = UIView.AutoresizingMask()
if drawerSide == .left {
self._leftDrawerViewController = viewController
@@ -859,7 +859,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
}
if viewController != nil {
- self.addChildViewController(viewController!)
+ self.addChild(viewController!)
if (self.openSide == drawerSide) && (self.childControllerContainerView.subviews as NSArray).contains(self.centerContainerView) {
self.childControllerContainerView.insertSubview(viewController!.view, belowSubview: self.centerContainerView)
@@ -867,11 +867,11 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
viewController!.endAppearanceTransition()
} else {
self.childControllerContainerView.addSubview(viewController!.view)
- self.childControllerContainerView.sendSubview(toBack: viewController!.view)
+ self.childControllerContainerView.sendSubviewToBack(viewController!.view)
viewController!.view.isHidden = true
}
- viewController!.didMove(toParentViewController: self)
+ viewController!.didMove(toParent: self)
viewController!.view.autoresizingMask = autoResizingMask
viewController!.view.frame = viewController!.evo_visibleDrawerFrame
}
@@ -885,13 +885,13 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
}
if let oldCenterViewController = self._centerViewController {
- oldCenterViewController.willMove(toParentViewController: nil)
+ oldCenterViewController.willMove(toParent: nil)
if animated == false {
oldCenterViewController.beginAppearanceTransition(false, animated: false)
}
- oldCenterViewController.removeFromParentViewController()
+ oldCenterViewController.removeFromParent()
oldCenterViewController.view.removeFromSuperview()
if animated == false {
@@ -902,10 +902,10 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
self._centerViewController = centerViewController
if self._centerViewController != nil {
- self.addChildViewController(self._centerViewController!)
+ self.addChild(self._centerViewController!)
self._centerViewController!.view.frame = self.childControllerContainerView.bounds
self.centerContainerView.addSubview(self._centerViewController!.view)
- self.childControllerContainerView.bringSubview(toFront: self.centerContainerView)
+ self.childControllerContainerView.bringSubviewToFront(self.centerContainerView)
self._centerViewController!.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
self.updateShadowForCenterView()
@@ -916,7 +916,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
self._centerViewController!.endAppearanceTransition()
}
- self._centerViewController!.didMove(toParentViewController: self)
+ self._centerViewController!.didMove(toParent: self)
}
}
}
@@ -952,7 +952,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
self.closeDrawer(animated: animated, completion: { (finished) in
if forwardAppearanceMethodsToCenterViewController {
self.centerViewController!.endAppearanceTransition()
- self.centerViewController!.didMove(toParentViewController: self)
+ self.centerViewController!.didMove(toParent: self)
}
completion?(finished)
@@ -1022,7 +1022,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
}, completion: { (finished) -> Void in
if forwardAppearanceMethodsToCenterViewController {
self.centerViewController?.endAppearanceTransition()
- self.centerViewController?.didMove(toParentViewController: self)
+ self.centerViewController?.didMove(toParent: self)
}
sideDrawerViewController?.endAppearanceTransition()
@@ -1232,7 +1232,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
self.openDrawerSide(drawerSide, animated: animated, velocity: self.animationVelocity, animationOptions: [], completion: completion)
}
- fileprivate func openDrawerSide(_ drawerSide: DrawerSide, animated: Bool, velocity: CGFloat, animationOptions options: UIViewAnimationOptions, completion: ((Bool) -> Void)?) {
+ fileprivate func openDrawerSide(_ drawerSide: DrawerSide, animated: Bool, velocity: CGFloat, animationOptions options: UIView.AnimationOptions, completion: ((Bool) -> Void)?) {
assert({ () -> Bool in
return drawerSide != .none
}(), "drawerSide cannot be .None")
@@ -1293,7 +1293,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
self.closeDrawer(animated: animated, velocity: self.animationVelocity, animationOptions: [], completion: completion)
}
- fileprivate func closeDrawer(animated: Bool, velocity: CGFloat, animationOptions options: UIViewAnimationOptions, completion: ((Bool) -> Void)?) {
+ fileprivate func closeDrawer(animated: Bool, velocity: CGFloat, animationOptions options: UIView.AnimationOptions, completion: ((Bool) -> Void)?) {
if self.animatingDrawer {
completion?(false)
} else {
@@ -1445,7 +1445,7 @@ open class DrawerController: UIViewController, UIGestureRecognizerDelegate {
if oldShadowPath != nil {
let transition = CABasicAnimation(keyPath: "shadowPath")
transition.fromValue = oldShadowPath
- transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
+ transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
transition.duration = context.transitionDuration
self.centerContainerView.layer.add(transition, forKey: "transition")
}
diff --git a/KitchenSink/DrawerControllerKitchenSink.xcodeproj/project.pbxproj b/KitchenSink/DrawerControllerKitchenSink.xcodeproj/project.pbxproj
index 175fb68..3801ae4 100644
--- a/KitchenSink/DrawerControllerKitchenSink.xcodeproj/project.pbxproj
+++ b/KitchenSink/DrawerControllerKitchenSink.xcodeproj/project.pbxproj
@@ -511,7 +511,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -525,7 +525,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.evolved.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 4.2;
};
name = Release;
};
diff --git a/KitchenSink/DrawerControllerKitchenSink.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/KitchenSink/DrawerControllerKitchenSink.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/KitchenSink/DrawerControllerKitchenSink.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/KitchenSink/ExampleFiles/AppDelegate.swift b/KitchenSink/ExampleFiles/AppDelegate.swift
index 759c1f5..c8c8f5d 100644
--- a/KitchenSink/ExampleFiles/AppDelegate.swift
+++ b/KitchenSink/ExampleFiles/AppDelegate.swift
@@ -27,7 +27,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var drawerController: DrawerController!
- func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+ func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let leftSideDrawerViewController = ExampleLeftSideDrawerViewController()
let centerViewController = ExampleCenterTableViewController()
let rightSideDrawerViewController = ExampleRightSideDrawerViewController()
@@ -63,13 +63,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return true
}
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
- self.window?.backgroundColor = UIColor.white
- self.window?.makeKeyAndVisible()
- return true
- }
-
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
+ self.window?.backgroundColor = UIColor.white
+ self.window?.makeKeyAndVisible()
+
+ return true
+ }
+
func application(_ application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool {
return true
}
@@ -77,9 +78,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool {
return true
}
-
- func application(_ application: UIApplication, viewControllerWithRestorationIdentifierPath identifierComponents: [Any], coder: NSCoder) -> UIViewController? {
- if let key = identifierComponents.last as? String {
+
+
+ func application(_ application: UIApplication, viewControllerWithRestorationIdentifierPath identifierComponents: [String], coder: NSCoder) -> UIViewController? {
+
+ if let key = identifierComponents.last {
if key == "Drawer" {
return self.window?.rootViewController
} else if key == "ExampleCenterNavigationControllerRestorationKey" {
diff --git a/KitchenSink/ExampleFiles/TableViewHelpers/CenterTableViewCell.swift b/KitchenSink/ExampleFiles/TableViewHelpers/CenterTableViewCell.swift
index d3501a8..ada13b1 100644
--- a/KitchenSink/ExampleFiles/TableViewHelpers/CenterTableViewCell.swift
+++ b/KitchenSink/ExampleFiles/TableViewHelpers/CenterTableViewCell.swift
@@ -21,7 +21,7 @@
import UIKit
class CenterTableViewCell: TableViewCell {
- override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.accessoryCheckmarkColor = UIColor(red: 13 / 255, green: 88 / 255, blue: 161 / 255, alpha: 1.0)
}
@@ -32,6 +32,6 @@ class CenterTableViewCell: TableViewCell {
}
override func updateContentForNewContentSize() {
- self.textLabel?.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
+ self.textLabel?.font = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.body)
}
}
diff --git a/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerSectionHeaderView.swift b/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerSectionHeaderView.swift
index a8ab595..aef90b3 100644
--- a/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerSectionHeaderView.swift
+++ b/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerSectionHeaderView.swift
@@ -41,7 +41,7 @@ class SideDrawerSectionHeaderView: UIView {
func commonSetup() {
self.backgroundColor = UIColor(red: 110 / 255, green: 113 / 255, blue: 115 / 255, alpha: 1.0)
self.label = UILabel(frame: CGRect(x: 15, y: self.bounds.maxY - 28, width: self.bounds.width - 30, height: 22))
- self.label.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.caption1)
+ self.label.font = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.caption1)
self.label.backgroundColor = UIColor.clear
self.label.textColor = UIColor(red: 203 / 255, green: 206 / 255, blue: 209 / 255, alpha: 1.0)
self.label.autoresizingMask = [ .flexibleWidth ,.flexibleTopMargin ]
diff --git a/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerTableViewCell.swift b/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerTableViewCell.swift
index f0b89e8..9b73991 100644
--- a/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerTableViewCell.swift
+++ b/KitchenSink/ExampleFiles/TableViewHelpers/SideDrawerTableViewCell.swift
@@ -21,7 +21,9 @@
import UIKit
class SideDrawerTableViewCell: TableViewCell {
- override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
+
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.commonSetup()
}
@@ -45,6 +47,6 @@ class SideDrawerTableViewCell: TableViewCell {
}
override func updateContentForNewContentSize() {
- self.textLabel?.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
+ self.textLabel?.font = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.body)
}
}
diff --git a/KitchenSink/ExampleFiles/TableViewHelpers/TableViewCell.swift b/KitchenSink/ExampleFiles/TableViewHelpers/TableViewCell.swift
index 0f6904f..84182a0 100644
--- a/KitchenSink/ExampleFiles/TableViewHelpers/TableViewCell.swift
+++ b/KitchenSink/ExampleFiles/TableViewHelpers/TableViewCell.swift
@@ -125,7 +125,7 @@ private class CustomCheckmark: UIControl {
class TableViewCell: UITableViewCell {
var accessoryCheckmarkColor: UIColor = UIColor.white
var disclosureIndicatorColor: UIColor = UIColor.white
- override var accessoryType: UITableViewCellAccessoryType {
+ override var accessoryType: UITableViewCell.AccessoryType {
didSet {
if self.accessoryType == .checkmark {
let customCheckmark = CustomCheckmark(frame: CGRect(x: 0, y: 0, width: 15, height: 15))
@@ -141,7 +141,7 @@ class TableViewCell: UITableViewCell {
}
}
- override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.updateContentForNewContentSize()
diff --git a/KitchenSink/ExampleFiles/ViewControllers/ExampleSideDrawerViewController.swift b/KitchenSink/ExampleFiles/ViewControllers/ExampleSideDrawerViewController.swift
index d00d01e..a6c1f10 100644
--- a/KitchenSink/ExampleFiles/ViewControllers/ExampleSideDrawerViewController.swift
+++ b/KitchenSink/ExampleFiles/ViewControllers/ExampleSideDrawerViewController.swift
@@ -48,7 +48,7 @@ class ExampleSideDrawerViewController: ExampleViewController, UITableViewDataSou
self.tableView.separatorStyle = .none
self.navigationController?.navigationBar.barTintColor = UIColor(red: 161 / 255, green: 164 / 255, blue: 166 / 255, alpha: 1.0)
- self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor(red: 55 / 255, green: 70 / 255, blue: 77 / 255, alpha: 1.0)]
+ self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor(red: 55 / 255, green: 70 / 255, blue: 77 / 255, alpha: 1.0)]
self.view.backgroundColor = UIColor.clear
}
diff --git a/KitchenSink/ExampleFiles/ViewControllers/ExampleViewController.swift b/KitchenSink/ExampleFiles/ViewControllers/ExampleViewController.swift
index 9b383d6..9a92c90 100644
--- a/KitchenSink/ExampleFiles/ViewControllers/ExampleViewController.swift
+++ b/KitchenSink/ExampleFiles/ViewControllers/ExampleViewController.swift
@@ -24,12 +24,12 @@ class ExampleViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
- NotificationCenter.default.addObserver(self, selector: #selector(contentSizeDidChangeNotification(_:)), name: NSNotification.Name.UIContentSizeCategoryDidChange, object: nil)
+ NotificationCenter.default.addObserver(self, selector: #selector(contentSizeDidChangeNotification(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil)
}
@objc fileprivate func contentSizeDidChangeNotification(_ notification: Notification) {
if let userInfo: NSDictionary = (notification as NSNotification).userInfo as NSDictionary? {
- self.contentSizeDidChange(userInfo[UIContentSizeCategoryNewValueKey] as! String)
+ self.contentSizeDidChange(userInfo[UIContentSizeCategory.newValueUserInfoKey] as! String)
}
}
diff --git a/README.md b/README.md
index b54ade5..197e93a 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,10 @@
-***************
-WARNING: THIS PROJECT IS DEPRECATED
-====================================
-It will not receive any future updates or bug fixes. If you are using it, please migrate to another solution.
-***************
-# Drawer Controller
-[](http://cocoadocs.org/docsets/DrawerController/4.0.0/) [](http://opensource.org/licenses/MIT) [](https://github.com/Carthage/Carthage)
+# AMDrawer Controller
+[](http://cocoadocs.org/docsets/DrawerController/4.0.0/) [](http://opensource.org/licenses/MIT)
-`DrawerController` is a swift version of the popular `MMDrawerController` by [Mutual Mobile](https://github.com/mutualmobile/MMDrawerController).
+`AMDrawerController` is a swift version of the popular `MMDrawerController` by [Mutual Mobile](https://github.com/mutualmobile/MMDrawerController).
-Some minor changes in this version include the removal of all < iOS 7.0 related code and the use of spring animations instead of ease-in-ease-out animations. We've also added an animated `BarButtonItem` and plan to enable additional features for regular horizontal size classes (i.e. iPad and iPhone 6 Plus in landscape).
+Some minor changes in this version include the removal of all < iOS 8.0 related code and the use of spring animations instead of ease-in-ease-out animations. We've also added an animated `BarButtonItem` and plan to enable additional features for regular horizontal size classes (i.e. iPad and iPhone 6 Plus in landscape).
This is currently a work in progress and has not been thoroughly tested. Use at your own risk.
@@ -19,16 +14,10 @@ This is currently a work in progress and has not been thoroughly tested. Use at
#### [CocoaPods](http://cocoapods.org)
````ruby
-platform :ios, '8.0'
+platform :ios, '9.0'
use_frameworks!
-pod 'DrawerController', '~> 4.0'
-````
-
-#### [Carthage](https://github.com/Carthage/Carthage)
-
-````bash
-github "sascha/DrawerController"
+pod 'AMDrawerController', '4.2.4'
````
---
@@ -41,7 +30,10 @@ Swift version by
* [Sascha Schwabbauer](http://twitter.com/_saschas)
* [Malte Baumann](http://twitter.com/codingdivision)
+Swift version 4.2 by
+
+* Anumothu
---
## License
-`DrawerController` is available under the MIT license. See the LICENSE file for more info.
+AM`DrawerController` is available under the MIT license. See the LICENSE file for more info.