Adjustments to get example project working in pod.

This commit is contained in:
jonkykong committed 2015-12-28 13:47:28 -08:00
1 parent 71233f6e6c
commit 5d8d8f858c
14 files changed
+409 -1150

No files matched your search

+1 -1
View File
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../
SPEC CHECKSUMS:
SideMenu: 69301b63864937c9ce956fe6eea6c051309702b8
SideMenu: 62c97561370244e645f3bccecb8a9055f78d0ccc
COCOAPODS: 0.39.0
+5 -5
View File
@@ -1,15 +1,15 @@
{
"name": "SideMenu",
"version": "0.1.0",
"summary": "A short description of SideMenu.",
"description": "",
"homepage": "https://github.com/<GITHUB_USERNAME>/SideMenu",
"summary": "SideMenu is a simple and versatile side menu control.",
"description": "SideMenu is a simple and versatile side menu control. It's highly customizable, but can also be implemented in storyboard without a single line of code. The are three standard animation styles to choose from along with several other options for further customization if desired.",
"homepage": "https://github.com/jonkykong/SideMenu",
"license": "MIT",
"authors": {
"jonkykong": "jpkent@gmail.com"
"jonkykong": "jonk@jonked.com"
},
"source": {
"git": "https://github.com/<GITHUB_USERNAME>/SideMenu.git",
"git": "https://github.com/jonkykong/SideMenu.git",
"tag": "0.1.0"
},
"platforms": {
+1 -1
View File
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../
SPEC CHECKSUMS:
SideMenu: 69301b63864937c9ce956fe6eea6c051309702b8
SideMenu: 62c97561370244e645f3bccecb8a9055f78d0ccc
COCOAPODS: 0.39.0
+258 -251
View File
@@ -355,7 +355,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0720;
};
buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */;
compatibilityVersion = "Xcode 3.2";
@@ -452,7 +452,254 @@
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */ = {
1172A3F34D7462D0EFC174D13D0724C0 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
ENABLE_STRICT_OBJC_MSGSEND = YES;
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
1EC00988E2D5E536164FD65B5B7606CE /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CCFF9BC0A5E0AEB1B572E08B7BEB5179 /* Pods-SideMenu_Example.debug.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Example/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap";
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = Pods_SideMenu_Example;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
23009718110AA4419556802863B90459 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DDF7D1E1EB67D0EE22B89DBA15B34455 /* Pods-SideMenu_Tests.release.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Tests/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = Pods_SideMenu_Tests;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
3961F0342E7342A8384B62C747F3638C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8C8996A684FFB0A03C0298FA9C22C599 /* Pods-SideMenu_Example.release.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Example/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = Pods_SideMenu_Example;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
STRIP_INSTALLED_PRODUCT = NO;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
};
A7BE67B6B9190796258F5FDAEAC80D73 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
ENABLE_STRICT_OBJC_MSGSEND = YES;
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
E42C2A0F148DC029F335357420326E00 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREFIX_HEADER = "Target Support Files/SideMenu/SideMenu-prefix.pch";
INFOPLIST_FILE = "Target Support Files/SideMenu/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/SideMenu/SideMenu.modulemap";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
ED62A0916410AD025BFF45DDD485F331 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 283B837F6AEE40BE625A3B7BF3D629C4 /* Pods-SideMenu_Tests.debug.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Tests/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap";
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = Pods_SideMenu_Tests;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
F7C4602CB02B1340BDE3074D5F614CEE /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREFIX_HEADER = "Target Support Files/SideMenu/SideMenu-prefix.pch";
INFOPLIST_FILE = "Target Support Files/SideMenu/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/SideMenu/SideMenu.modulemap";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
FB45FFD90572718D82AB9092B750F0CA /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -479,261 +726,21 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
STRIP_INSTALLED_PRODUCT = NO;
SYMROOT = "${SRCROOT}/../build";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
1172A3F34D7462D0EFC174D13D0724C0 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
ENABLE_STRICT_OBJC_MSGSEND = YES;
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
14F143D5C2752E44749D1EC383187D83 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREFIX_HEADER = "Target Support Files/SideMenu/SideMenu-prefix.pch";
INFOPLIST_FILE = "Target Support Files/SideMenu/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/SideMenu/SideMenu.modulemap";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
1A1DFAB73E3BCE317F818DF29B215695 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREFIX_HEADER = "Target Support Files/SideMenu/SideMenu-prefix.pch";
INFOPLIST_FILE = "Target Support Files/SideMenu/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/SideMenu/SideMenu.modulemap";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
2EB0CE4B4B01F7BD476A4D670271AE17 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CCFF9BC0A5E0AEB1B572E08B7BEB5179 /* Pods-SideMenu_Example.debug.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Example/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap";
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_NAME = Pods_SideMenu_Example;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
4BB072E6B47F8EB051B54E2DE42E1FD8 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DDF7D1E1EB67D0EE22B89DBA15B34455 /* Pods-SideMenu_Tests.release.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Tests/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_NAME = Pods_SideMenu_Tests;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
552D02D5BA751AC2E8790D2811D496CA /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
ONLY_ACTIVE_ARCH = YES;
STRIP_INSTALLED_PRODUCT = NO;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
};
A7BE67B6B9190796258F5FDAEAC80D73 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */;
buildSettings = {
ENABLE_STRICT_OBJC_MSGSEND = YES;
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
F63258B6CA1B3208C73CC58D46C45DCC /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8C8996A684FFB0A03C0298FA9C22C599 /* Pods-SideMenu_Example.release.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Example/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_NAME = Pods_SideMenu_Example;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
F768C225F5E2AABD5C951C2B97495DB8 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 283B837F6AEE40BE625A3B7BF3D629C4 /* Pods-SideMenu_Tests.debug.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Tests/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap";
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_NAME = Pods_SideMenu_Tests;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
552D02D5BA751AC2E8790D2811D496CA /* Debug */,
10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */,
A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */,
FB45FFD90572718D82AB9092B750F0CA /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -741,8 +748,8 @@
3D93A69AAD3C2EED734F2EF2AC5E2718 /* Build configuration list for PBXNativeTarget "Pods-SideMenu_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F768C225F5E2AABD5C951C2B97495DB8 /* Debug */,
4BB072E6B47F8EB051B54E2DE42E1FD8 /* Release */,
ED62A0916410AD025BFF45DDD485F331 /* Debug */,
23009718110AA4419556802863B90459 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -750,8 +757,8 @@
7FE2F09AF56807079C7692E4D8ECEEF5 /* Build configuration list for PBXNativeTarget "Pods-SideMenu_Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2EB0CE4B4B01F7BD476A4D670271AE17 /* Debug */,
F63258B6CA1B3208C73CC58D46C45DCC /* Release */,
1EC00988E2D5E536164FD65B5B7606CE /* Debug */,
3961F0342E7342A8384B62C747F3638C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -759,8 +766,8 @@
9057029D293AD6EDC6335C1F302EE42B /* Build configuration list for PBXNativeTarget "SideMenu" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1A1DFAB73E3BCE317F818DF29B215695 /* Debug */,
14F143D5C2752E44749D1EC383187D83 /* Release */,
F7C4602CB02B1340BDE3074D5F614CEE /* Debug */,
E42C2A0F148DC029F335357420326E00 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -1,36 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = 'D99DD784FF3DFD841BAF16C0'
BlueprintName = 'SideMenu'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'SideMenu.framework'>
BuildableIdentifier = "primary"
BlueprintIdentifier = "92B1C7A9E8122442B031A44C1CA691AF"
BuildableName = "SideMenu.framework"
BlueprintName = "SideMenu"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
@@ -38,17 +41,25 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "92B1C7A9E8122442B031A44C1CA691AF"
BuildableName = "SideMenu.framework"
BlueprintName = "SideMenu"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
@@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
+20 -20
View File
@@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
+4 -14
View File
@@ -13,7 +13,6 @@
84788C781C2B9F1E00C4DAF4 /* MainVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84788C741C2B9F1E00C4DAF4 /* MainVC.swift */; };
84788C7B1C2B9FAB00C4DAF4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84788C7A1C2B9FAB00C4DAF4 /* AppDelegate.swift */; };
84788C7D1C2BCDEB00C4DAF4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84788C7C1C2BCDEB00C4DAF4 /* Main.storyboard */; };
84788C831C2CED6200C4DAF4 /* SideMenuManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84788C821C2CED6200C4DAF4 /* SideMenuManager.swift */; };
A91D298EBD84AC675595CCA0 /* Pods_SideMenu_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B02FB2E5A68EB8A0DF6615E0 /* Pods_SideMenu_Example.framework */; };
AFA077A8EC0A5A74F8D6FF18 /* Pods_SideMenu_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8960F7A82F3CB64025C48B38 /* Pods_SideMenu_Tests.framework */; };
/* End PBXBuildFile section */
@@ -44,7 +43,6 @@
84788C741C2B9F1E00C4DAF4 /* MainVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainVC.swift; sourceTree = "<group>"; };
84788C7A1C2B9FAB00C4DAF4 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
84788C7C1C2BCDEB00C4DAF4 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
84788C821C2CED6200C4DAF4 /* SideMenuManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideMenuManager.swift; sourceTree = "<group>"; };
8960F7A82F3CB64025C48B38 /* Pods_SideMenu_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SideMenu_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A20C1DB98DEF29F3CE8D592A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
B02FB2E5A68EB8A0DF6615E0 /* Pods_SideMenu_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SideMenu_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -109,7 +107,6 @@
84788C741C2B9F1E00C4DAF4 /* MainVC.swift */,
84788C7C1C2BCDEB00C4DAF4 /* Main.storyboard */,
607FACDE1AFB9204008FA782 /* LaunchScreen.xib */,
84788C821C2CED6200C4DAF4 /* SideMenuManager.swift */,
607FACD31AFB9204008FA782 /* Supporting Files */,
);
name = "Example for SideMenu";
@@ -363,7 +360,6 @@
buildActionMask = 2147483647;
files = (
84788C7B1C2B9FAB00C4DAF4 /* AppDelegate.swift in Sources */,
84788C831C2CED6200C4DAF4 /* SideMenuManager.swift in Sources */,
84788C781C2B9F1E00C4DAF4 /* MainVC.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -435,7 +431,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -473,7 +469,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
@@ -514,10 +510,7 @@
baseConfigurationReference = DE8F7B5954B4505A3C5E06E2 /* Pods-SideMenu_Tests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
@@ -535,10 +528,7 @@
baseConfigurationReference = 1CE9C93C88C569ADEEDC53CE /* Pods-SideMenu_Tests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
+1
View File
@@ -6,6 +6,7 @@
//
import UIKit
import SideMenu
class MainVC: UIViewController {
-757
View File
@@ -1,757 +0,0 @@
//
// SideMenuManager.swift
//
// Created by Jon Kent on 12/6/15.
// Copyright © 2015 Jon Kent. All rights reserved.
//
import UIKit
/* Example usage:
SideMenuManager.menuLeftNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UILeftSideMenuNavigationController") as? UILeftSideMenuNavigationController
SideMenuManager.menuRightNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UIRightSideMenuNavigationController") as? UIRightSideMenuNavigationController
SideMenuManager.menuAddPanToPresentGesture(toView: self.navigationController!.navigationBar)
SideMenuManager.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view)
*/
private func menuViewDidAppear(navigationController: UINavigationController) {
// we had presented a view before, so lets dismiss ourselves as already acted upon
if navigationController.view.hidden {
SideMenuManager.hideMenuComplete()
navigationController.dismissViewControllerAnimated(false, completion: { () -> Void in
navigationController.view.hidden = false
})
}
}
private func menuViewWillDisappear(navigationController: UINavigationController) {
// when presenting a view controller from the menu, the menu view gets moved into another transition view above our transition container
// which can break the visual layout we had before. So, we move the menu view back to its original transition view to preserve it.
if !navigationController.isBeingDismissed() {
if let mainView = navigationController.presentingViewController?.view {
switch SideMenuManager.menuPresentMode {
case .ViewSlideOut:
mainView.superview?.insertSubview(navigationController.view, belowSubview: mainView)
case .MenuSlideIn, .MenuDissolveIn:
mainView.superview?.insertSubview(navigationController.view, aboveSubview: SideMenuManager.tapView)
}
}
}
}
private func menuViewDidDisappear(navigationController: UINavigationController) {
// we're presenting a view controller from the menu, so we need to hide the menu so it isn't g when the presented view is dismissed.
if !navigationController.isBeingDismissed() {
navigationController.view.hidden = true
SideMenuManager.hideMenuAppearance()
}
}
private func menuViewWillTransitionToSize(navigationController: UINavigationController, size: CGSize, coordinator: UIViewControllerTransitionCoordinator) {
// don't bother resizing if the view isn't visible
if navigationController.view.hidden {
return
}
SideMenuManager.statusBarView?.hidden = true
coordinator.animateAlongsideTransition({ (context) -> Void in
SideMenuManager.presentMenuAppearance(forSize: size)
}) { (context) -> Void in
SideMenuManager.statusBarView?.hidden = false
}
}
private func menuPushViewController(navigationController: UINavigationController, viewController: UIViewController, animated: Bool) {
if let menuViewController: UINavigationController = SideMenuManager.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController : SideMenuManager.menuRightNavigationController {
if let presentingViewController = menuViewController.presentingViewController as? UINavigationController {
// to avoid overlapping dismiss & pop/push calls, create a transaction block where the menu
// is dismissed after showing the appropriate screen
CATransaction.begin()
CATransaction.setCompletionBlock( { () -> Void in
navigationController.dismissViewControllerAnimated(true, completion: nil)
navigationController.visibleViewController?.viewWillAppear(false) // Hack: force selection to get cleared on UITableViewControllers when reappearing using custom transitions
})
UIView.animateWithDuration(SideMenuManager.menuAnimationDismissDuration, animations: { () -> Void in
SideMenuManager.hideMenuAppearance()
})
if SideMenuManager.menuAllowPopIfPossible {
for subViewController in presentingViewController.viewControllers {
if subViewController.dynamicType == viewController.dynamicType {
presentingViewController.popToViewController(subViewController, animated: animated)
CATransaction.commit()
return
}
}
}
if !SideMenuManager.menuAllowPushOfSameClassTwice {
if presentingViewController.viewControllers.last?.dynamicType == viewController.dynamicType {
CATransaction.commit()
return
}
}
presentingViewController.pushViewController(viewController, animated: animated)
CATransaction.commit()
} else {
menuViewController.presentViewController(viewController, animated: animated, completion: nil)
print("Warning: attempted to push a ViewController from a ViewController that doesn't have a NavigationController. It will be presented it instead.")
}
}
}
class UILeftSideMenuNavigationController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
SideMenuManager.menuLeftNavigationController = self
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
menuViewDidAppear(self)
}
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
menuViewWillDisappear(self)
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
menuViewDidDisappear(self)
}
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
menuViewWillTransitionToSize(self, size: size, coordinator: coordinator)
}
override func pushViewController(viewController: UIViewController, animated: Bool) {
menuPushViewController(self, viewController: viewController, animated: animated)
}
}
class UIRightSideMenuNavigationController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
SideMenuManager.menuRightNavigationController = self
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
menuViewDidAppear(self)
}
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
menuViewWillDisappear(self)
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
menuViewDidDisappear(self)
}
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
menuViewWillTransitionToSize(self, size: size, coordinator: coordinator)
}
override func pushViewController(viewController: UIViewController, animated: Bool) {
menuPushViewController(self, viewController: viewController, animated: animated)
}
}
class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate {
enum MenuPresentMode {
case MenuSlideIn
case ViewSlideOut
case MenuDissolveIn
}
private static var presenting = false
private static var interactive = false
private static var presentDirection: UIRectEdge = .Left;
private static weak var tapView: UIView!
private static weak var statusBarView: UIView?
private static let singleton = SideMenuManager()
private static var originalLeftMenuBackgroundColor:UIColor?
private static var originalRightMenuBackgroundColor:UIColor?
static var menuPresentMode:MenuPresentMode = .ViewSlideOut
static var menuAllowPushOfSameClassTwice = true
static var menuAllowPopIfPossible = false
static var menuWidth: CGFloat = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.75), 240)
static var menuAnimationPresentDuration = 0.35
static var menuAnimationDismissDuration = 0.35
static var menuAnimationFadeStrength: CGFloat = 0
static var menuAnimationShrinkStrength: CGFloat = 1
static var menuAnimationShrinkBackgroundColor: UIColor?
static var menuShadowOpacity:Float = 0.5
static var menuShadowColor = UIColor.blackColor()
static var menuShadowRadius: CGFloat = 5
static weak var menuLeftSwipeToDismissGesture:UIPanGestureRecognizer?
static weak var menuRightSwipeToDismissGesture:UIPanGestureRecognizer?
static var menuParallaxStrength:Int = 0
static var menuFadeStatusBar = true
static var menuBlurEffectStyle: UIBlurEffectStyle? {
didSet {
updateMenuBlurIfNecessary()
}
}
// prevent instantiation
private override init() {}
static var menuLeftNavigationController: UILeftSideMenuNavigationController? {
willSet {
if menuLeftNavigationController != nil {
let originalBlurEffectStyle = menuBlurEffectStyle
menuBlurEffectStyle = nil
updateMenuBlurIfNecessary()
menuBlurEffectStyle = originalBlurEffectStyle
}
}
didSet {
if let menuLeftNavigationController = menuLeftNavigationController {
let exitPanGesture = UIPanGestureRecognizer()
exitPanGesture.addTarget(self, action:"handleHideMenuPan:")
menuLeftNavigationController.view.addGestureRecognizer(exitPanGesture)
menuLeftNavigationController.transitioningDelegate = singleton
menuLeftSwipeToDismissGesture = exitPanGesture
updateMenuBlurIfNecessary()
}
}
}
static var menuRightNavigationController: UIRightSideMenuNavigationController? {
willSet {
if menuRightNavigationController != nil {
let originalBlurEffectStyle = menuBlurEffectStyle
menuBlurEffectStyle = nil
updateMenuBlurIfNecessary()
menuBlurEffectStyle = originalBlurEffectStyle
}
}
didSet {
if let menuRightNavigationController = menuRightNavigationController {
let exitPanGesture = UIPanGestureRecognizer()
exitPanGesture.addTarget(self, action:"handleHideMenuPan:")
menuRightNavigationController.view.addGestureRecognizer(exitPanGesture)
menuRightNavigationController.transitioningDelegate = singleton
menuRightSwipeToDismissGesture = exitPanGesture
updateMenuBlurIfNecessary()
}
}
}
private class func updateMenuBlurIfNecessary() {
if let menuLeftNavigationController = menuLeftNavigationController, let view = menuLeftNavigationController.visibleViewController?.view {
if !UIAccessibilityIsReduceTransparencyEnabled() && menuBlurEffectStyle != nil {
if originalLeftMenuBackgroundColor == nil {
originalLeftMenuBackgroundColor = view.backgroundColor
}
setupMenuBlurForMenu(menuLeftNavigationController)
} else if originalLeftMenuBackgroundColor != nil {
removeMenuBlurForMenu(menuLeftNavigationController)
view.backgroundColor = originalLeftMenuBackgroundColor!
originalLeftMenuBackgroundColor = nil
}
}
if let menuRightNavigationController = menuRightNavigationController, let view = menuRightNavigationController.visibleViewController?.view {
if !UIAccessibilityIsReduceTransparencyEnabled() && menuBlurEffectStyle != nil {
if originalRightMenuBackgroundColor == nil {
originalRightMenuBackgroundColor = view.backgroundColor
}
setupMenuBlurForMenu(menuRightNavigationController)
} else if originalRightMenuBackgroundColor != nil {
removeMenuBlurForMenu(menuRightNavigationController)
view.backgroundColor = originalRightMenuBackgroundColor!
originalRightMenuBackgroundColor = nil
}
}
}
private class func setupMenuBlurForMenu(forMenu: UINavigationController) {
removeMenuBlurForMenu(forMenu)
if let tableViewController = forMenu.visibleViewController as? UITableViewController {
tableViewController.tableView.backgroundColor = UIColor.clearColor()
let blurEffect = UIBlurEffect(style: menuBlurEffectStyle!)
tableViewController.tableView.backgroundView = UIVisualEffectView(effect: blurEffect)
tableViewController.tableView.separatorEffect = UIVibrancyEffect(forBlurEffect: blurEffect)
tableViewController.tableView.reloadData()
} else if let viewController = forMenu.visibleViewController {
viewController.view.backgroundColor = UIColor.clearColor()
let blurView = UIVisualEffectView(effect: UIBlurEffect(style: menuBlurEffectStyle!))
blurView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth]
blurView.frame = viewController.view.bounds
viewController.view.insertSubview(blurView, atIndex: 0)
}
}
private class func removeMenuBlurForMenu(forMenu: UINavigationController) {
if let tableViewController = forMenu.visibleViewController as? UITableViewController {
tableViewController.tableView.backgroundView = nil
tableViewController.tableView.separatorEffect = nil
tableViewController.tableView.reloadData()
} else if let viewController = forMenu.visibleViewController {
if let blurView = viewController.view.subviews[0] as? UIVisualEffectView {
blurView.removeFromSuperview()
}
}
}
private static var viewControllerForPresentedMenu: UIViewController? {
get {
return menuLeftNavigationController?.presentingViewController != nil ? menuLeftNavigationController?.presentingViewController : menuRightNavigationController?.presentingViewController
}
}
class func menuAddScreenEdgePanGesturesToPresent(toView toView: UIView, forMenu:UIRectEdge? = nil) -> [UIScreenEdgePanGestureRecognizer] {
var array = [UIScreenEdgePanGestureRecognizer]()
if forMenu != .Right {
let leftScreenEdgeGestureRecognizer = UIScreenEdgePanGestureRecognizer()
leftScreenEdgeGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:")
leftScreenEdgeGestureRecognizer.edges = .Left
leftScreenEdgeGestureRecognizer.cancelsTouchesInView = true
toView.addGestureRecognizer(leftScreenEdgeGestureRecognizer)
array.append(leftScreenEdgeGestureRecognizer)
}
if forMenu != .Left {
let rightScreenEdgeGestureRecognizer = UIScreenEdgePanGestureRecognizer()
rightScreenEdgeGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:")
rightScreenEdgeGestureRecognizer.edges = .Right
rightScreenEdgeGestureRecognizer.cancelsTouchesInView = true
toView.addGestureRecognizer(rightScreenEdgeGestureRecognizer)
array.append(rightScreenEdgeGestureRecognizer)
}
return array
}
class func menuAddPanGestureToPresent(toView toView: UIView) -> UIPanGestureRecognizer {
let panGestureRecognizer = UIPanGestureRecognizer()
panGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:")
toView.addGestureRecognizer(panGestureRecognizer)
return panGestureRecognizer
}
class func handlePresentMenuPan(pan: UIPanGestureRecognizer) {
// how much distance have we panned in reference to the parent view?
if let view = viewControllerForPresentedMenu != nil ? viewControllerForPresentedMenu?.view : pan.view {
let transform = view.transform
view.transform = CGAffineTransformIdentity
let translation = pan.translationInView(pan.view!)
view.transform = transform
// do some math to translate this to a percentage based value
if !interactive {
if translation.x == 0 {
return // not sure which way the user is swiping yet, so do nothing
}
if let edge = pan as? UIScreenEdgePanGestureRecognizer {
presentDirection = edge.edges == .Left ? .Left : .Right
} else {
presentDirection = translation.x > 0 ? .Left : .Right
}
if let menuViewController: UINavigationController = presentDirection == .Left ? menuLeftNavigationController : menuRightNavigationController {
interactive = true
if let visibleViewController = visibleViewController() {
visibleViewController.presentViewController(menuViewController, animated: true, completion: nil)
}
}
}
let direction:CGFloat = presentDirection == .Left ? 1 : -1
let distance = translation.x / menuWidth
// now lets deal with different states that the gesture recognizer sends
switch (pan.state) {
case .Began, .Changed:
if pan is UIScreenEdgePanGestureRecognizer {
singleton.updateInteractiveTransition(min(distance * direction, 1))
} else if distance > 0 && presentDirection == .Right && menuLeftNavigationController != nil {
presentDirection = .Left
singleton.cancelInteractiveTransition()
viewControllerForPresentedMenu?.presentViewController(menuLeftNavigationController!, animated: true, completion: nil)
} else if distance < 0 && presentDirection == .Left && menuRightNavigationController != nil {
presentDirection = .Right
singleton.cancelInteractiveTransition()
viewControllerForPresentedMenu?.presentViewController(menuRightNavigationController!, animated: true, completion: nil)
} else {
singleton.updateInteractiveTransition(min(distance * direction, 1))
}
default:
interactive = false
view.transform = CGAffineTransformIdentity
let velocity = pan.velocityInView(pan.view!).x * direction
view.transform = transform
if velocity >= 100 || velocity >= -50 && abs(distance) >= 0.5 {
singleton.finishInteractiveTransition()
} else {
singleton.cancelInteractiveTransition()
}
}
}
}
class func handleHideMenuPan(pan: UIPanGestureRecognizer) {
let translation = pan.translationInView(pan.view!)
let direction:CGFloat = presentDirection == .Left ? -1 : 1
let distance = translation.x / menuWidth * direction
switch (pan.state) {
case .Began:
interactive = true
viewControllerForPresentedMenu?.dismissViewControllerAnimated(true, completion: nil)
case .Changed:
singleton.updateInteractiveTransition(max(min(distance, 1), 0))
default:
interactive = false
let velocity = pan.velocityInView(pan.view!).x * direction
if velocity >= 100 || velocity >= -50 && distance >= 0.5 {
singleton.finishInteractiveTransition()
}
else {
singleton.cancelInteractiveTransition()
}
}
}
class func handleHideMenuTap(tap: UITapGestureRecognizer) {
viewControllerForPresentedMenu?.dismissViewControllerAnimated(true, completion: nil)
}
private class func visibleViewController() -> UIViewController? {
return getVisibleViewControllerFrom(UIApplication.sharedApplication().keyWindow?.rootViewController)
}
private class func getVisibleViewControllerFrom(viewController: UIViewController?) -> UIViewController? {
if let navigationController = viewController as? UINavigationController {
return getVisibleViewControllerFrom(navigationController.visibleViewController)
} else if let tabBarController = viewController as? UITabBarController {
return getVisibleViewControllerFrom(tabBarController.selectedViewController)
} else if let presentedViewController = viewController?.presentedViewController {
return getVisibleViewControllerFrom(presentedViewController)
}
return viewController
}
private class func hideMenuAppearance() {
let mainViewController = viewControllerForPresentedMenu!
let menuView = presentDirection == .Left ? menuLeftNavigationController!.view : menuRightNavigationController!.view
menuView.transform = CGAffineTransformIdentity
mainViewController.view.transform = CGAffineTransformIdentity
mainViewController.view.alpha = 1
tapView.frame = CGRectMake(0, 0, mainViewController.view.frame.width, mainViewController.view.frame.height)
menuView.frame.origin.y = 0
menuView.frame.size.width = menuWidth
menuView.frame.size.height = mainViewController.view.frame.height
statusBarView?.frame = UIApplication.sharedApplication().statusBarFrame
statusBarView?.alpha = 0
switch menuPresentMode {
case .ViewSlideOut:
menuView.alpha = 1 - menuAnimationFadeStrength
menuView.frame.origin.x = presentDirection == .Left ? 0 : mainViewController.view.frame.width - menuWidth
mainViewController.view.frame.origin.x = 0
menuView.transform = CGAffineTransformMakeScale(menuAnimationShrinkStrength, menuAnimationShrinkStrength)
case .MenuSlideIn:
menuView.alpha = 1
menuView.frame.origin.x = presentDirection == .Left ? -menuView.frame.width : mainViewController.view.frame.width
case .MenuDissolveIn:
menuView.alpha = 0
menuView.frame.origin.x = presentDirection == .Left ? 0 : mainViewController.view.frame.width - menuWidth
mainViewController.view.frame.origin.x = 0
}
}
private class func hideMenuComplete() {
let mainViewController = viewControllerForPresentedMenu!
let menuView = presentDirection == .Left ? menuLeftNavigationController!.view : menuRightNavigationController!.view
tapView.removeFromSuperview()
statusBarView?.removeFromSuperview()
mainViewController.view.motionEffects.removeAll()
mainViewController.view.layer.shadowOpacity = 0
menuView.layer.shadowOpacity = 0
NSNotificationCenter.defaultCenter().removeObserver(singleton)
if let topNavigationController = mainViewController as? UINavigationController {
topNavigationController.interactivePopGestureRecognizer!.enabled = true
}
}
private class func presentMenuAppearance(forSize size: CGSize = UIScreen.mainScreen().bounds.size) {
let mainViewController = viewControllerForPresentedMenu!
if let menuView = presentDirection == .Left ? menuLeftNavigationController?.view : menuRightNavigationController?.view {
menuView.transform = CGAffineTransformIdentity
mainViewController.view.transform = CGAffineTransformIdentity
menuView.frame.size.width = menuWidth
menuView.frame.size.height = size.height
menuView.frame.origin.x = presentDirection == .Left ? 0 : size.width - menuWidth
statusBarView?.frame = UIApplication.sharedApplication().statusBarFrame
statusBarView?.alpha = 1
switch menuPresentMode {
case .ViewSlideOut:
menuView.alpha = 1
let direction:CGFloat = presentDirection == .Left ? 1 : -1
mainViewController.view.frame.origin.x = direction * (menuView.frame.width)
mainViewController.view.layer.shadowColor = menuShadowColor.CGColor
mainViewController.view.layer.shadowRadius = menuShadowRadius
mainViewController.view.layer.shadowOpacity = menuShadowOpacity
mainViewController.view.layer.shadowOffset = CGSizeMake(0, 0)
case .MenuSlideIn, .MenuDissolveIn:
menuView.alpha = 1
menuView.layer.shadowColor = menuShadowColor.CGColor
menuView.layer.shadowRadius = menuShadowRadius
menuView.layer.shadowOpacity = menuShadowOpacity
menuView.layer.shadowOffset = CGSizeMake(0, 0)
mainViewController.view.frame = CGRectMake(0, 0, size.width, size.height)
mainViewController.view.transform = CGAffineTransformMakeScale(menuAnimationShrinkStrength, menuAnimationShrinkStrength)
mainViewController.view.alpha = 1 - menuAnimationFadeStrength
}
}
}
private class func presentMenuComplete() {
let mainViewController = viewControllerForPresentedMenu!
switch menuPresentMode {
case .MenuSlideIn, .MenuDissolveIn:
if menuParallaxStrength != 0 {
let horizontal = UIInterpolatingMotionEffect(keyPath: "center.x", type: .TiltAlongHorizontalAxis)
horizontal.minimumRelativeValue = -menuParallaxStrength
horizontal.maximumRelativeValue = menuParallaxStrength
let vertical = UIInterpolatingMotionEffect(keyPath: "center.y", type: .TiltAlongVerticalAxis)
vertical.minimumRelativeValue = -menuParallaxStrength
vertical.maximumRelativeValue = menuParallaxStrength
let group = UIMotionEffectGroup()
group.motionEffects = [horizontal, vertical]
mainViewController.view.addMotionEffect(group)
}
case .ViewSlideOut: break;
}
if let topNavigationController = mainViewController as? UINavigationController {
topNavigationController.interactivePopGestureRecognizer!.enabled = false
}
}
// MARK: UIViewControllerAnimatedTransitioning protocol methods
// animate a change from one viewcontroller to another
func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
// get reference to our fromView, toView and the container view that we should perform the transition in
let container = transitionContext.containerView()!
if let menuShrinkBackgroundColor = SideMenuManager.menuAnimationShrinkBackgroundColor {
container.backgroundColor = menuShrinkBackgroundColor
}
// create a tuple of our screens
let screens : (from:UIViewController, to:UIViewController) = (transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)!, transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)!)
// assign references to our menu view controller and the 'bottom' view controller from the tuple
// remember that our menuViewController will alternate between the from and to view controller depending if we're presenting or dismissing
let menuViewController = (!SideMenuManager.presenting ? screens.from : screens.to)
let topViewController = !SideMenuManager.presenting ? screens.to : screens.from
let menuView = menuViewController.view
let topView = topViewController.view
// prepare menu items to slide in
if SideMenuManager.presenting {
let tapView = UIView()
tapView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth]
let exitPanGesture = UIPanGestureRecognizer()
exitPanGesture.addTarget(SideMenuManager.self, action:"handleHideMenuPan:")
let exitTapGesture = UITapGestureRecognizer()
exitTapGesture.addTarget(SideMenuManager.self, action: "handleHideMenuTap:")
tapView.addGestureRecognizer(exitPanGesture)
tapView.addGestureRecognizer(exitTapGesture)
// add the both views to our view controller
switch SideMenuManager.menuPresentMode {
case .ViewSlideOut:
container.addSubview(menuView)
container.addSubview(topView)
topView.addSubview(tapView)
case .MenuSlideIn, .MenuDissolveIn:
container.addSubview(topView)
container.addSubview(tapView)
container.addSubview(menuView)
}
if SideMenuManager.menuFadeStatusBar {
let blackBar = UIView()
if let menuShrinkBackgroundColor = SideMenuManager.menuAnimationShrinkBackgroundColor {
blackBar.backgroundColor = menuShrinkBackgroundColor
} else {
blackBar.backgroundColor = UIColor.blackColor()
}
blackBar.userInteractionEnabled = false
container.addSubview(blackBar)
SideMenuManager.statusBarView = blackBar
}
SideMenuManager.tapView = tapView
SideMenuManager.hideMenuAppearance() // offstage for interactive
NSNotificationCenter.defaultCenter().addObserver(SideMenuManager.singleton, selector:"applicationDidEnterBackgroundNotification", name: UIApplicationDidEnterBackgroundNotification, object: nil)
}
// perform the animation!
let duration = transitionDuration(transitionContext)
let options: UIViewAnimationOptions = SideMenuManager.interactive ? .CurveLinear : .CurveEaseInOut
UIView.animateWithDuration(duration, delay: 0, options: options, animations: { () -> Void in
if SideMenuManager.presenting {
SideMenuManager.presentMenuAppearance() // onstage items: slide in
}
else {
SideMenuManager.hideMenuAppearance()
}
}) { (finished) -> Void in
// if UIApplication.sharedApplication().visibleViewController!.preferredStatusBarStyle() != statusBarStyle {
// // See http://www.openradar.me/21961293
// print("Warning: do not change the status bar style while using interactive transitions or you risk transitions not properly completing.")
// }
// tell our transitionContext object that we've finished animating
if transitionContext.transitionWasCancelled() {
if SideMenuManager.presenting {
SideMenuManager.hideMenuComplete()
}
transitionContext.completeTransition(false)
} else {
if SideMenuManager.presenting {
SideMenuManager.presentMenuComplete()
transitionContext.completeTransition(true)
switch SideMenuManager.menuPresentMode {
case .ViewSlideOut:
container.addSubview(topView)
case .MenuSlideIn, .MenuDissolveIn:
container.insertSubview(topView, atIndex: 0)
}
if let statusBarView = SideMenuManager.statusBarView {
container.bringSubviewToFront(statusBarView)
}
} else {
SideMenuManager.hideMenuComplete()
transitionContext.completeTransition(true)
menuView.removeFromSuperview()
}
}
}
}
// return how many seconds the transiton animation will take
func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
return SideMenuManager.presenting ? SideMenuManager.menuAnimationPresentDuration : SideMenuManager.menuAnimationDismissDuration
}
// MARK: UIViewControllerTransitioningDelegate protocol methods
// return the animataor when presenting a viewcontroller
// rememeber that an animator (or animation controller) is any object that aheres to the UIViewControllerAnimatedTransitioning protocol
func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
SideMenuManager.presenting = true
SideMenuManager.presentDirection = presented == SideMenuManager.menuLeftNavigationController ? .Left : .Right
return self
}
// return the animator used when dismissing from a viewcontroller
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
SideMenuManager.presenting = false
return self
}
func interactionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
// if our interactive flag is true, return the transition manager object
// otherwise return nil
return SideMenuManager.interactive ? SideMenuManager.singleton : nil
}
func interactionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
return SideMenuManager.interactive ? SideMenuManager.singleton : nil
}
func applicationDidEnterBackgroundNotification() {
if let menuViewController: UINavigationController = SideMenuManager.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController : SideMenuManager.menuRightNavigationController {
SideMenuManager.hideMenuAppearance()
SideMenuManager.hideMenuComplete()
menuViewController.dismissViewControllerAnimated(false, completion: nil)
}
}
}
class VibrantCell: UITableViewCell {
private var vibrancyView:UIVisualEffectView = UIVisualEffectView()
private var vibrancySelectedBackgroundView:UIVisualEffectView = UIVisualEffectView()
private var defaultSelectedBackgroundView:UIView?
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
vibrancyView.frame = bounds
vibrancyView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth]
for view in subviews {
vibrancyView.contentView.addSubview(view)
}
addSubview(vibrancyView)
let blurSelectionEffect = UIBlurEffect(style: .Light)
vibrancySelectedBackgroundView.effect = blurSelectionEffect
defaultSelectedBackgroundView = selectedBackgroundView
}
override func layoutSubviews() {
super.layoutSubviews()
if !UIAccessibilityIsReduceTransparencyEnabled() && SideMenuManager.menuBlurEffectStyle != nil {
let blurEffect = UIBlurEffect(style: SideMenuManager.menuBlurEffectStyle!)
vibrancyView.effect = UIVibrancyEffect(forBlurEffect: blurEffect)
if selectedBackgroundView != nil && selectedBackgroundView != vibrancySelectedBackgroundView {
vibrancySelectedBackgroundView.contentView.addSubview(selectedBackgroundView!)
selectedBackgroundView = vibrancySelectedBackgroundView
}
} else {
vibrancyView.effect = nil
selectedBackgroundView = defaultSelectedBackgroundView
}
}
}
+46 -46
View File
@@ -102,83 +102,83 @@ private func menuPushViewController(navigationController: UINavigationController
}
}
class UILeftSideMenuNavigationController: UINavigationController {
public class UILeftSideMenuNavigationController: UINavigationController {
override func viewDidLoad() {
override public func viewDidLoad() {
super.viewDidLoad()
SideMenuManager.menuLeftNavigationController = self
}
override func viewDidAppear(animated: Bool) {
override public func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
menuViewDidAppear(self)
}
override func viewWillDisappear(animated: Bool) {
override public func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
menuViewWillDisappear(self)
}
override func viewDidDisappear(animated: Bool) {
override public func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
menuViewDidDisappear(self)
}
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
override public func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
menuViewWillTransitionToSize(self, size: size, coordinator: coordinator)
}
override func pushViewController(viewController: UIViewController, animated: Bool) {
override public func pushViewController(viewController: UIViewController, animated: Bool) {
menuPushViewController(self, viewController: viewController, animated: animated)
}
}
class UIRightSideMenuNavigationController: UINavigationController {
public class UIRightSideMenuNavigationController: UINavigationController {
override func viewDidLoad() {
override public func viewDidLoad() {
super.viewDidLoad()
SideMenuManager.menuRightNavigationController = self
}
override func viewDidAppear(animated: Bool) {
override public func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
menuViewDidAppear(self)
}
override func viewWillDisappear(animated: Bool) {
override public func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
menuViewWillDisappear(self)
}
override func viewDidDisappear(animated: Bool) {
override public func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
menuViewDidDisappear(self)
}
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
override public func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
menuViewWillTransitionToSize(self, size: size, coordinator: coordinator)
}
override func pushViewController(viewController: UIViewController, animated: Bool) {
override public func pushViewController(viewController: UIViewController, animated: Bool) {
menuPushViewController(self, viewController: viewController, animated: animated)
}
}
class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate {
public class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate {
enum MenuPresentMode {
public enum MenuPresentMode {
case MenuSlideIn
case ViewSlideOut
case MenuDissolveIn
@@ -193,24 +193,24 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
private static var originalLeftMenuBackgroundColor:UIColor?
private static var originalRightMenuBackgroundColor:UIColor?
static var menuPresentMode:MenuPresentMode = .ViewSlideOut
static var menuAllowPushOfSameClassTwice = true
static var menuAllowPopIfPossible = false
static var menuWidth: CGFloat = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.75), 240)
static var menuAnimationPresentDuration = 0.35
static var menuAnimationDismissDuration = 0.35
static var menuAnimationFadeStrength: CGFloat = 0
static var menuAnimationShrinkStrength: CGFloat = 1
static var menuAnimationShrinkBackgroundColor: UIColor?
static var menuShadowOpacity:Float = 0.5
static var menuShadowColor = UIColor.blackColor()
static var menuShadowRadius: CGFloat = 5
static weak var menuLeftSwipeToDismissGesture:UIPanGestureRecognizer?
static weak var menuRightSwipeToDismissGesture:UIPanGestureRecognizer?
static var menuParallaxStrength:Int = 0
static var menuFadeStatusBar = true
public static var menuPresentMode:MenuPresentMode = .ViewSlideOut
public static var menuAllowPushOfSameClassTwice = true
public static var menuAllowPopIfPossible = false
public static var menuWidth: CGFloat = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.75), 240)
public static var menuAnimationPresentDuration = 0.35
public static var menuAnimationDismissDuration = 0.35
public static var menuAnimationFadeStrength: CGFloat = 0
public static var menuAnimationShrinkStrength: CGFloat = 1
public static var menuAnimationShrinkBackgroundColor: UIColor?
public static var menuShadowOpacity:Float = 0.5
public static var menuShadowColor = UIColor.blackColor()
public static var menuShadowRadius: CGFloat = 5
public static weak var menuLeftSwipeToDismissGesture:UIPanGestureRecognizer?
public static weak var menuRightSwipeToDismissGesture:UIPanGestureRecognizer?
public static var menuParallaxStrength:Int = 0
public static var menuFadeStatusBar = true
static var menuBlurEffectStyle: UIBlurEffectStyle? {
public static var menuBlurEffectStyle: UIBlurEffectStyle? {
didSet {
updateMenuBlurIfNecessary()
}
@@ -219,7 +219,7 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
// prevent instantiation
private override init() {}
static var menuLeftNavigationController: UILeftSideMenuNavigationController? {
public static var menuLeftNavigationController: UILeftSideMenuNavigationController? {
willSet {
if menuLeftNavigationController != nil {
let originalBlurEffectStyle = menuBlurEffectStyle
@@ -240,7 +240,7 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
}
}
static var menuRightNavigationController: UIRightSideMenuNavigationController? {
public static var menuRightNavigationController: UIRightSideMenuNavigationController? {
willSet {
if menuRightNavigationController != nil {
let originalBlurEffectStyle = menuBlurEffectStyle
@@ -327,7 +327,7 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
}
}
class func menuAddScreenEdgePanGesturesToPresent(toView toView: UIView, forMenu:UIRectEdge? = nil) -> [UIScreenEdgePanGestureRecognizer] {
public class func menuAddScreenEdgePanGesturesToPresent(toView toView: UIView, forMenu:UIRectEdge? = nil) -> [UIScreenEdgePanGestureRecognizer] {
var array = [UIScreenEdgePanGestureRecognizer]()
@@ -352,7 +352,7 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
return array
}
class func menuAddPanGestureToPresent(toView toView: UIView) -> UIPanGestureRecognizer {
public class func menuAddPanGestureToPresent(toView toView: UIView) -> UIPanGestureRecognizer {
let panGestureRecognizer = UIPanGestureRecognizer()
panGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:")
toView.addGestureRecognizer(panGestureRecognizer)
@@ -573,7 +573,7 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
// MARK: UIViewControllerAnimatedTransitioning protocol methods
// animate a change from one viewcontroller to another
func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
public func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
// get reference to our fromView, toView and the container view that we should perform the transition in
let container = transitionContext.containerView()!
@@ -677,7 +677,7 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
}
// return how many seconds the transiton animation will take
func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
public func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
return SideMenuManager.presenting ? SideMenuManager.menuAnimationPresentDuration : SideMenuManager.menuAnimationDismissDuration
}
@@ -685,25 +685,25 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
// return the animataor when presenting a viewcontroller
// rememeber that an animator (or animation controller) is any object that aheres to the UIViewControllerAnimatedTransitioning protocol
func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
public func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
SideMenuManager.presenting = true
SideMenuManager.presentDirection = presented == SideMenuManager.menuLeftNavigationController ? .Left : .Right
return self
}
// return the animator used when dismissing from a viewcontroller
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
public func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
SideMenuManager.presenting = false
return self
}
func interactionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
public func interactionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
// if our interactive flag is true, return the transition manager object
// otherwise return nil
return SideMenuManager.interactive ? SideMenuManager.singleton : nil
}
func interactionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
public func interactionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
return SideMenuManager.interactive ? SideMenuManager.singleton : nil
}
@@ -717,13 +717,13 @@ class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAni
}
class VibrantCell: UITableViewCell {
public class VibrantCell: UITableViewCell {
private var vibrancyView:UIVisualEffectView = UIVisualEffectView()
private var vibrancySelectedBackgroundView:UIVisualEffectView = UIVisualEffectView()
private var defaultSelectedBackgroundView:UIView?
required init?(coder aDecoder: NSCoder) {
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
vibrancyView.frame = bounds
@@ -738,7 +738,7 @@ class VibrantCell: UITableViewCell {
defaultSelectedBackgroundView = selectedBackgroundView
}
override func layoutSubviews() {
override public func layoutSubviews() {
super.layoutSubviews()
if !UIAccessibilityIsReduceTransparencyEnabled() && SideMenuManager.menuBlurEffectStyle != nil {
+1 -1
View File
@@ -23,7 +23,7 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/jonkykong/SideMenu"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "jonkykong" => "jpkent@gmail.com" }
s.author = { "jonkykong" => "jonk@jonked.com" }
s.source = { :git => "https://github.com/jonkykong/SideMenu.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'