diff --git a/.gitignore b/.gitignore
index 5192b08..b2e3198 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,40 @@
+# Mac OSX
+#
+.DS_Store
+
+# Xcode
+#
+build/
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata
+*.xccheckout
+*.moved-aside
+DerivedData
+*.hmap
+*.ipa
+*.xcuserstate
+*.xcscmblueprint
+
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
-# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
+# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
-xcuserdata/
-*.xccheckout
-*.gcno
-*.gcda
+# Pods/
+
+# Carthage
+#
+# Add this line if you want to avoid checking in source code from Carthage dependencies.
+# Carthage/Checkouts
+
+Carthage/Build
+
+
diff --git a/.swift-version b/.swift-version
new file mode 100644
index 0000000..5186d07
--- /dev/null
+++ b/.swift-version
@@ -0,0 +1 @@
+4.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cdeb175..0171050 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,64 @@
+4.0.0 Release notes (2017-10-31)
+=============================================================
+
+### Enhancements
+* Support Swift4.0
+
+### Bugfixes
+* None.
+
+
+3.0.2 Release notes (2017-08-23)
+=============================================================
+
+### Enhancements
+* Added option `animationOptions`.
+
+### Bugfixes
+* Respect root view controller’s preferredStatusBarStyle.
+
+
+3.0.1 Release notes (2016-12-02)
+=============================================================
+
+### Enhancements
+* Added options `panGesturesEnabled` and `tapGesturesEnabled`.
+ Options defaults are of course set to enabled/true so no impact to anyone already using this.
+
+### Bugfixes
+* Fix project settings.
+
+
+3.0.0 Release notes (2016-09-12)
+=============================================================
+
+### Enhancements
+* Support Swift3.0
+
+### Bugfixes
+* None.
+
+
+2.3.0 Release notes (2016-09-12)
+=============================================================
+
+### Enhancements
+* Support Swift2.3
+
+### Bugfixes
+* None.
+
+
+2.2.3 Release notes (2016-09-12)
+=============================================================
+
+### Enhancements
+* None.
+
+### Bugfixes
+* Added viewWillAppear on mainViewController when SlideMenuController appears on screen
+* Fixes sample project image.
+
2.2.2 Release notes (2016-07-15)
=============================================================
diff --git a/README.md b/README.md
index 359e952..dad4d3f 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,15 @@
SlideMenuControllerSwift
========================
-[](https://developer.apple.com/iphone/index.action)
-[](https://developer.apple.com/swift)
[](http://mit-license.org)
[](https://github.com/dekatotoro/SlideMenuControllerSwift/issues?state=open)
+[](https://cocoapods.org/pods/SlideMenuControllerSwift)
@@ -16,14 +17,14 @@ iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app.

-##Installation
+## Installation
-####CocoaPods
+#### CocoaPods
```
pod 'SlideMenuControllerSwift'
```
-
-####Carthage
+
+#### Carthage
if iOS8 or later, Carthage is supported
@@ -32,12 +33,12 @@ if iOS8 or later, Carthage is supported
for more info, see [Carthage](https://github.com/carthage/carthage)
-####Manually
-Add the `SlideMenuController.swift` file to your project.
+#### Manually
+Add the `SlideMenuController.swift` file to your project.
-##Usage
+## Usage
-###Setup
+### Setup
Add `import SlideMenuControllerSwift` in your file
@@ -48,7 +49,7 @@ In your app delegate:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// create viewController code...
-
+
let slideMenuController = SlideMenuController(mainViewController: mainViewController, leftMenuViewController: leftViewController, rightMenuViewController: rightViewController)
self.window?.rootViewController = slideMenuController
self.window?.makeKeyAndVisible()
@@ -57,7 +58,7 @@ func application(application: UIApplication, didFinishLaunchingWithOptions launc
}
```
-####Storyboard Support
+#### Storyboard Support
1. Inherit `SlideMenuController` and put UIViewController in a storyboard.
2. Override `awakeFromNib`, then instantiate any view controllers
@@ -84,10 +85,10 @@ If you want to use the custom option, please set them before calling the init me
SlideMenuOptions.leftViewWidth = 50
SlideMenuOptions.contentViewScale = .50
...
-
+
```
-###You can access from UIViewController
+### You can access from UIViewController
```swift
self.slideMenuController()?
@@ -98,7 +99,7 @@ if let slideMenuController = self.slideMenuController() {
// some code
}
```
-### add navigationBarButton
+### add navigationBarButton
```swift
viewController.addLeftBarButtonWithImage(UIImage(named: "hoge")!)
viewController.addRightBarButtonWithImage(UIImage(named: "fuga")!)
@@ -128,12 +129,10 @@ func rightDidClose()
```
## Requirements
-Requires Swift2.0 and iOS 8.0 and ARC.
-If you are developing in the swift1.1, please use branch of swift1.1.
-If you are developing in the swift1.2, please use branch of swift1.2.
-If you are developing in the swift2.1, please use branch of swift2.1.
-If you want to use even iOS7.0, please to import the code directly.
-If you want to use objective-c even iOS6.0, plesea use [SlideMenuControllerOC](https://github.com/Pluto-Y/SlideMenuControllerOC).
+Requires Swift4.0 and iOS 9.0 and ARC.
+If you are developing in the Swift1.1 ~ 3.2, please use branch of swift1.1 ~ 3.
+If you want to use even iOS8.0, please to import the code directly.
+If you want to use objective-c even iOS6.0, plesea use [SlideMenuControllerOC](https://github.com/Pluto-Y/SlideMenuControllerOC).
## Features
- Highly customizable
@@ -145,7 +144,7 @@ Forks, patches and other feedback are welcome.
## Creator
### SlideMenuControllerSwift
-[Yuji Hato](https://github.com/dekatotoro)
+[Yuji Hato](https://github.com/dekatotoro)
[Blog](http://buzzmemo.blogspot.jp/)
### SlideMenuControllerOC
diff --git a/SlideMenuControllerSwift.podspec b/SlideMenuControllerSwift.podspec
index b783edd..4512a61 100644
--- a/SlideMenuControllerSwift.podspec
+++ b/SlideMenuControllerSwift.podspec
@@ -1,15 +1,14 @@
Pod::Spec.new do |s|
s.name = "SlideMenuControllerSwift"
- s.version = "2.2.2"
+ s.version = "4.0.0"
s.summary = "iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app."
s.homepage = "https://github.com/dekatotoro/SlideMenuControllerSwift"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Yuji Hato" => "hatoyujidev@gmail.com" }
s.social_media_url = "https://twitter.com/dekatotoro"
s.platform = :ios
- s.ios.deployment_target = "8.0"
+ s.ios.deployment_target = "9.0"
s.source = { :git => "https://github.com/dekatotoro/SlideMenuControllerSwift.git", :tag => s.version }
- s.source_files = "Source/*"
+ s.source_files = "Source/*.swift"
s.requires_arc = true
end
-
diff --git a/SlideMenuControllerSwift.xcodeproj/project.pbxproj b/SlideMenuControllerSwift.xcodeproj/project.pbxproj
index 951ac31..b7cc546 100644
--- a/SlideMenuControllerSwift.xcodeproj/project.pbxproj
+++ b/SlideMenuControllerSwift.xcodeproj/project.pbxproj
@@ -323,7 +323,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
- LastUpgradeCheck = 0710;
+ LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Yuji Hato";
TargetAttributes = {
0E75C5951BE3CA7900844634 = {
@@ -331,9 +331,11 @@
};
C539E6401A315E87003B7CC7 = {
CreatedOnToolsVersion = 6.1.1;
+ LastSwiftMigration = 0800;
};
C539E6581A315E87003B7CC7 = {
CreatedOnToolsVersion = 6.1.1;
+ LastSwiftMigration = 0800;
TestTargetID = C539E6401A315E87003B7CC7;
};
};
@@ -469,6 +471,7 @@
0E75C59F1BE3CA7900844634 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
@@ -484,6 +487,7 @@
PRODUCT_BUNDLE_IDENTIFIER = dekatotoro.SlideMenuControllerSwift;
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
+ SWIFT_VERSION = 4.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -492,6 +496,7 @@
0E75C5A01BE3CA7900844634 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -507,6 +512,7 @@
PRODUCT_BUNDLE_IDENTIFIER = dekatotoro.SlideMenuControllerSwift;
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
+ SWIFT_VERSION = 4.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -520,13 +526,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -535,6 +549,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -552,6 +567,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@@ -564,13 +580,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -578,6 +602,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -587,6 +612,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -601,6 +628,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "dekatotoro.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@@ -612,8 +640,10 @@
INFOPLIST_FILE = SlideMenuControllerSwift/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "dekatotoro.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
@@ -622,10 +652,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
- FRAMEWORK_SEARCH_PATHS = (
- "$(SDKROOT)/Developer/Library/Frameworks",
- "$(inherited)",
- );
+ FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
@@ -634,6 +661,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "dekatotoro.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SlideMenuControllerSwift.app/SlideMenuControllerSwift";
};
name = Debug;
@@ -642,14 +670,12 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
- FRAMEWORK_SEARCH_PATHS = (
- "$(SDKROOT)/Developer/Library/Frameworks",
- "$(inherited)",
- );
+ FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = SlideMenuControllerSwiftTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "dekatotoro.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SlideMenuControllerSwift.app/SlideMenuControllerSwift";
};
name = Release;
diff --git a/SlideMenuControllerSwift.xcodeproj/xcshareddata/xcschemes/SlideMenuControllerSwift-iOS.xcscheme b/SlideMenuControllerSwift.xcodeproj/xcshareddata/xcschemes/SlideMenuControllerSwift-iOS.xcscheme
index 2a00476..e2b0e67 100644
--- a/SlideMenuControllerSwift.xcodeproj/xcshareddata/xcschemes/SlideMenuControllerSwift-iOS.xcscheme
+++ b/SlideMenuControllerSwift.xcodeproj/xcshareddata/xcschemes/SlideMenuControllerSwift-iOS.xcscheme
@@ -1,6 +1,6 @@