Skip to content

Commit c026df0

Browse files
authored
Merge pull request #68 from Yalantis/feature/swift5.2
Feature/swift5.2
2 parents b2e6ed8 + 0882bef commit c026df0

File tree

7 files changed

+85
-82
lines changed

7 files changed

+85
-82
lines changed

MenuExample.xcodeproj/project.pbxproj

+30-37
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
5008F06C1A6D0B4E00D6B4EE /* SideMenu.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 50B42F261A6A8E9800B05352 /* SideMenu.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
11-
5097E21E1A6A95CB002B4838 /* SideMenu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50B42F261A6A8E9800B05352 /* SideMenu.framework */; };
10+
188B7A1D2434A43400AD2C7E /* SideMenu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 188B7A1B2434A42C00AD2C7E /* SideMenu.framework */; };
11+
188B7A1E2434A43400AD2C7E /* SideMenu.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 188B7A1B2434A42C00AD2C7E /* SideMenu.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1212
D527A101E3BF9D807CC9609B /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D527A8A79CD3995976B1E6E1 /* LaunchScreen.xib */; };
1313
D527A20BFCB7C7B0E37A4763 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D527A0056D698FE36A57118C /* Main.storyboard */; };
1414
D527A433F1D6C1CBE9A8CCFE /* ContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D527AA09B1BD9459C6ADB97B /* ContentViewController.swift */; };
@@ -24,20 +24,13 @@
2424
/* End PBXBuildFile section */
2525

2626
/* Begin PBXContainerItemProxy section */
27-
50B42F251A6A8E9800B05352 /* PBXContainerItemProxy */ = {
27+
188B7A1A2434A42C00AD2C7E /* PBXContainerItemProxy */ = {
2828
isa = PBXContainerItemProxy;
29-
containerPortal = 50B42F211A6A8E9800B05352 /* SideMenu.xcodeproj */;
29+
containerPortal = 188B7A162434A42C00AD2C7E /* SideMenu.xcodeproj */;
3030
proxyType = 2;
3131
remoteGlobalIDString = 50B42F001A6A879C00B05352;
3232
remoteInfo = SideMenu;
3333
};
34-
50B42F271A6A8EA300B05352 /* PBXContainerItemProxy */ = {
35-
isa = PBXContainerItemProxy;
36-
containerPortal = 50B42F211A6A8E9800B05352 /* SideMenu.xcodeproj */;
37-
proxyType = 1;
38-
remoteGlobalIDString = 50B42EFF1A6A879C00B05352;
39-
remoteInfo = SideMenu;
40-
};
4134
/* End PBXContainerItemProxy section */
4235

4336
/* Begin PBXCopyFilesBuildPhase section */
@@ -47,14 +40,14 @@
4740
dstPath = "";
4841
dstSubfolderSpec = 10;
4942
files = (
50-
5008F06C1A6D0B4E00D6B4EE /* SideMenu.framework in CopyFiles */,
43+
188B7A1E2434A43400AD2C7E /* SideMenu.framework in CopyFiles */,
5144
);
5245
runOnlyForDeploymentPostprocessing = 0;
5346
};
5447
/* End PBXCopyFilesBuildPhase section */
5548

5649
/* Begin PBXFileReference section */
57-
50B42F211A6A8E9800B05352 /* SideMenu.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SideMenu.xcodeproj; path = ../../SideMenu/SideMenu.xcodeproj; sourceTree = "<group>"; };
50+
188B7A162434A42C00AD2C7E /* SideMenu.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = SideMenu.xcodeproj; sourceTree = SOURCE_ROOT; };
5851
50B9664E1A25E40E00208F2E /* MenuExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MenuExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
5952
50B966521A25E40E00208F2E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6053
D527A0056D698FE36A57118C /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
@@ -76,34 +69,42 @@
7669
isa = PBXFrameworksBuildPhase;
7770
buildActionMask = 2147483647;
7871
files = (
79-
5097E21E1A6A95CB002B4838 /* SideMenu.framework in Frameworks */,
72+
188B7A1D2434A43400AD2C7E /* SideMenu.framework in Frameworks */,
8073
);
8174
runOnlyForDeploymentPostprocessing = 0;
8275
};
8376
/* End PBXFrameworksBuildPhase section */
8477

8578
/* Begin PBXGroup section */
86-
50B42F201A6A8E8500B05352 /* Framework */ = {
79+
188B7A172434A42C00AD2C7E /* Products */ = {
8780
isa = PBXGroup;
8881
children = (
89-
50B42F211A6A8E9800B05352 /* SideMenu.xcodeproj */,
82+
188B7A1B2434A42C00AD2C7E /* SideMenu.framework */,
9083
);
91-
name = Framework;
84+
name = Products;
9285
sourceTree = "<group>";
9386
};
94-
50B42F221A6A8E9800B05352 /* Products */ = {
87+
188B7A1C2434A43400AD2C7E /* Frameworks */ = {
9588
isa = PBXGroup;
9689
children = (
97-
50B42F261A6A8E9800B05352 /* SideMenu.framework */,
9890
);
99-
name = Products;
91+
name = Frameworks;
92+
sourceTree = "<group>";
93+
};
94+
50B42F201A6A8E8500B05352 /* Framework */ = {
95+
isa = PBXGroup;
96+
children = (
97+
188B7A162434A42C00AD2C7E /* SideMenu.xcodeproj */,
98+
);
99+
name = Framework;
100100
sourceTree = "<group>";
101101
};
102102
50B966451A25E40E00208F2E = {
103103
isa = PBXGroup;
104104
children = (
105105
50B966501A25E40E00208F2E /* MenuExample */,
106106
50B9664F1A25E40E00208F2E /* Products */,
107+
188B7A1C2434A43400AD2C7E /* Frameworks */,
107108
);
108109
sourceTree = "<group>";
109110
};
@@ -223,7 +224,6 @@
223224
buildRules = (
224225
);
225226
dependencies = (
226-
50B42F281A6A8EA300B05352 /* PBXTargetDependency */,
227227
);
228228
name = MenuExample;
229229
productName = Menu;
@@ -242,24 +242,25 @@
242242
TargetAttributes = {
243243
50B9664D1A25E40E00208F2E = {
244244
CreatedOnToolsVersion = 6.1;
245-
LastSwiftMigration = 0800;
245+
LastSwiftMigration = 1140;
246246
};
247247
};
248248
};
249249
buildConfigurationList = 50B966491A25E40E00208F2E /* Build configuration list for PBXProject "MenuExample" */;
250250
compatibilityVersion = "Xcode 3.2";
251-
developmentRegion = English;
251+
developmentRegion = en;
252252
hasScannedForEncodings = 0;
253253
knownRegions = (
254254
en,
255+
Base,
255256
);
256257
mainGroup = 50B966451A25E40E00208F2E;
257258
productRefGroup = 50B9664F1A25E40E00208F2E /* Products */;
258259
projectDirPath = "";
259260
projectReferences = (
260261
{
261-
ProductGroup = 50B42F221A6A8E9800B05352 /* Products */;
262-
ProjectRef = 50B42F211A6A8E9800B05352 /* SideMenu.xcodeproj */;
262+
ProductGroup = 188B7A172434A42C00AD2C7E /* Products */;
263+
ProjectRef = 188B7A162434A42C00AD2C7E /* SideMenu.xcodeproj */;
263264
},
264265
);
265266
projectRoot = "";
@@ -270,11 +271,11 @@
270271
/* End PBXProject section */
271272

272273
/* Begin PBXReferenceProxy section */
273-
50B42F261A6A8E9800B05352 /* SideMenu.framework */ = {
274+
188B7A1B2434A42C00AD2C7E /* SideMenu.framework */ = {
274275
isa = PBXReferenceProxy;
275276
fileType = wrapper.framework;
276277
path = SideMenu.framework;
277-
remoteRef = 50B42F251A6A8E9800B05352 /* PBXContainerItemProxy */;
278+
remoteRef = 188B7A1A2434A42C00AD2C7E /* PBXContainerItemProxy */;
278279
sourceTree = BUILT_PRODUCTS_DIR;
279280
};
280281
/* End PBXReferenceProxy section */
@@ -311,14 +312,6 @@
311312
};
312313
/* End PBXSourcesBuildPhase section */
313314

314-
/* Begin PBXTargetDependency section */
315-
50B42F281A6A8EA300B05352 /* PBXTargetDependency */ = {
316-
isa = PBXTargetDependency;
317-
name = SideMenu;
318-
targetProxy = 50B42F271A6A8EA300B05352 /* PBXContainerItemProxy */;
319-
};
320-
/* End PBXTargetDependency section */
321-
322315
/* Begin XCBuildConfiguration section */
323316
50B9666B1A25E40E00208F2E /* Debug */ = {
324317
isa = XCBuildConfiguration;
@@ -432,7 +425,7 @@
432425
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
433426
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
434427
PRODUCT_NAME = MenuExample;
435-
SWIFT_VERSION = 4.2;
428+
SWIFT_VERSION = 5.0;
436429
};
437430
name = Debug;
438431
};
@@ -445,7 +438,7 @@
445438
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
446439
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
447440
PRODUCT_NAME = MenuExample;
448-
SWIFT_VERSION = 4.2;
441+
SWIFT_VERSION = 5.0;
449442
};
450443
name = Release;
451444
};

MenuExample.xcodeproj/xcshareddata/xcschemes/MenuExample.xcscheme

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1140"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:MenuExample.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:MenuExample.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

README.md

+13-10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Check this <a href="https://www.behance.net/gallery/20411445/Mobile-Animations-I
1313
## Requirements
1414

1515
- iOS 7+
16-
- Swift 4.2
17-
- Xcode 9
16+
- Swift 5
17+
- Xcode 11
1818

1919
## Installation
2020

@@ -23,7 +23,7 @@ Check this <a href="https://www.behance.net/gallery/20411445/Mobile-Animations-I
2323
Simply add the following line to your Podfile:
2424

2525
```ruby
26-
pod 'YALSideMenu', '~> 2.1'
26+
pod 'YALSideMenu', '~> 2.0.1'
2727
```
2828

2929
*(CocoaPods v1.1 or later is required)*
@@ -53,7 +53,7 @@ pod 'YALSideMenu', '~> 2.1'
5353

5454
```swift
5555
class MyFancyMenuViewController: UIViewController, Menu {
56-
@IBOutlet var menuItems = [UIView] ()
56+
@IBOutlet var menuItems = [UIView] ()
5757
}
5858
```
5959

@@ -63,25 +63,28 @@ pod 'YALSideMenu', '~> 2.1'
6363
```swift
6464
import SideMenu
6565
class ContentViewController: UIViewController {
66-
var menuAnimator : MenuTransitionAnimator!
66+
var menuAnimator : MenuTransitionAnimator!
6767
}
6868
```
6969
5. Initialize an animator for presentation with parameters
7070

7171
```swift
7272
menuAnimator = MenuTransitionAnimator(mode: .presentation, shouldPassEventsOutsideMenu: false) { [unowned self] in
73-
self.dismiss(animated: true, completion: nil)
73+
self.dismiss(animated: true, completion: nil)
7474
}
7575
```
7676

77-
If you want, for example, to dismiss your menu when a tap outside menu takes place, you should pass 'false' to 'shouldPassEventsOutsideMenu' flag and assign a 'tappedOutsideHandler'.In fact, you are free to do whatever you want when a tap outside menu occurs or, if you want to have access to your content view controller, just pass 'true' and assign 'tappedOutsideHandler' to nil.
77+
If you want, for example, to dismiss your menu when a tap outside menu takes place, you should pass `false` to `shouldPassEventsOutsideMenu` flag and assign a `tappedOutsideHandler`.In fact, you are free to do whatever you want when a tap outside menu occurs or, if you want to have access to your content view controller, just pass `true` and assign `tappedOutsideHandler` to nil.
78+
79+
It's possible to specify menu position starting from version `2.0.2`. To position menu on the left side you should pass `.left` to `position` in `MenuTransitionAnimator` init. To position menu on the right side - pass `.right` accordingly.
80+
7881
6. Implement class of UIViewControllerTransitioningDelegate that will return our menuAnimator from method animationControllerForPresentedController and assign it to transitioningDelegate of menu view controller(Don't forget to set .Custom modal presentation style). To dismiss menu you should return MenuTransitionAnimator(mode: .Dismissal) from animationControllerForDismissedController method.
7982

8083
```swift
8184
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
82-
let menu = segue.destination as! MenuViewController
83-
menu.transitioningDelegate = self
84-
menu.modalPresentationStyle = .custom
85+
let menu = segue.destination as! MenuViewController
86+
menu.transitioningDelegate = self
87+
menu.modalPresentationStyle = .custom
8588
}
8689

8790
func animationController(forPresented presented: UIViewController, presenting _: UIViewController,

SideMenu.xcodeproj/project.pbxproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@
109109
attributes = {
110110
LastSwiftMigration = 0700;
111111
LastSwiftUpdateCheck = 0700;
112-
LastUpgradeCheck = 1000;
112+
LastUpgradeCheck = 1140;
113113
ORGANIZATIONNAME = Yalantis;
114114
TargetAttributes = {
115115
50B42EFF1A6A879C00B05352 = {
116116
CreatedOnToolsVersion = 6.1.1;
117-
LastSwiftMigration = 0800;
117+
LastSwiftMigration = 1140;
118118
};
119119
};
120120
};
@@ -123,6 +123,7 @@
123123
developmentRegion = English;
124124
hasScannedForEncodings = 0;
125125
knownRegions = (
126+
English,
126127
en,
127128
);
128129
mainGroup = 50B42EF61A6A879C00B05352;
@@ -163,6 +164,7 @@
163164
isa = XCBuildConfiguration;
164165
buildSettings = {
165166
ALWAYS_SEARCH_USER_PATHS = NO;
167+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
166168
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
167169
CLANG_CXX_LIBRARY = "libc++";
168170
CLANG_ENABLE_MODULES = YES;
@@ -222,6 +224,7 @@
222224
isa = XCBuildConfiguration;
223225
buildSettings = {
224226
ALWAYS_SEARCH_USER_PATHS = NO;
227+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
225228
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
226229
CLANG_CXX_LIBRARY = "libc++";
227230
CLANG_ENABLE_MODULES = YES;
@@ -286,7 +289,7 @@
286289
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
287290
PRODUCT_NAME = "$(TARGET_NAME)";
288291
SKIP_INSTALL = YES;
289-
SWIFT_VERSION = 4.2;
292+
SWIFT_VERSION = 5.0;
290293
};
291294
name = Debug;
292295
};
@@ -306,7 +309,7 @@
306309
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
307310
PRODUCT_NAME = "$(TARGET_NAME)";
308311
SKIP_INSTALL = YES;
309-
SWIFT_VERSION = 4.2;
312+
SWIFT_VERSION = 5.0;
310313
};
311314
name = Release;
312315
};

SideMenu.xcodeproj/xcshareddata/xcschemes/SideMenu.xcscheme

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1140"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -41,6 +41,15 @@
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4343
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<MacroExpansion>
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "50B42EFF1A6A879C00B05352"
48+
BuildableName = "SideMenu.framework"
49+
BlueprintName = "SideMenu"
50+
ReferencedContainer = "container:SideMenu.xcodeproj">
51+
</BuildableReference>
52+
</MacroExpansion>
4453
<Testables>
4554
<TestableReference
4655
skipped = "NO">
@@ -53,17 +62,6 @@
5362
</BuildableReference>
5463
</TestableReference>
5564
</Testables>
56-
<MacroExpansion>
57-
<BuildableReference
58-
BuildableIdentifier = "primary"
59-
BlueprintIdentifier = "50B42EFF1A6A879C00B05352"
60-
BuildableName = "SideMenu.framework"
61-
BlueprintName = "SideMenu"
62-
ReferencedContainer = "container:SideMenu.xcodeproj">
63-
</BuildableReference>
64-
</MacroExpansion>
65-
<AdditionalOptions>
66-
</AdditionalOptions>
6765
</TestAction>
6866
<LaunchAction
6967
buildConfiguration = "Debug"
@@ -84,8 +82,6 @@
8482
ReferencedContainer = "container:SideMenu.xcodeproj">
8583
</BuildableReference>
8684
</MacroExpansion>
87-
<AdditionalOptions>
88-
</AdditionalOptions>
8985
</LaunchAction>
9086
<ProfileAction
9187
buildConfiguration = "Release"

0 commit comments

Comments
 (0)