Skip to content

Commit a57e806

Browse files
committed
Migrate to swift 2.3
1 parent f2d07e8 commit a57e806

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

MenuExample.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
TargetAttributes = {
243243
50B9664D1A25E40E00208F2E = {
244244
CreatedOnToolsVersion = 6.1;
245+
LastSwiftMigration = 0800;
245246
};
246247
};
247248
};
@@ -404,6 +405,7 @@
404405
INFOPLIST_FILE = MenuExample/Info.plist;
405406
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
406407
PRODUCT_NAME = MenuExample;
408+
SWIFT_VERSION = 2.3;
407409
};
408410
name = Debug;
409411
};
@@ -415,6 +417,7 @@
415417
INFOPLIST_FILE = MenuExample/Info.plist;
416418
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
417419
PRODUCT_NAME = MenuExample;
420+
SWIFT_VERSION = 2.3;
418421
};
419422
name = Release;
420423
};

MenuExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MenuExample/Misc/AnimationDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import QuartzCore
88

9-
class AnimationDelegate {
9+
class AnimationDelegate: NSObject, CAAnimationDelegate {
1010
private let completion: () -> Void
1111

1212
init(completion: () -> Void) {

MenuExample/Misc/CircularRevealTransitionAnimator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension CircularRevealTransitionAnimator: UIViewControllerAnimatedTransitionin
2323
let target = context.viewForKey(UITransitionContextToViewKey)!
2424

2525
target.frame = frame
26-
context.containerView()!.insertSubview(target, aboveSubview: source)
26+
context.containerView().insertSubview(target, aboveSubview: source)
2727

2828
let center = target.convertPoint(self.center, fromView: nil)
2929
let radius: CGFloat = {
@@ -45,4 +45,4 @@ extension CircularRevealTransitionAnimator: UIViewControllerAnimatedTransitionin
4545
func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
4646
return duration
4747
}
48-
}
48+
}

SideMenu.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
TargetAttributes = {
115115
50B42EFF1A6A879C00B05352 = {
116116
CreatedOnToolsVersion = 6.1.1;
117+
LastSwiftMigration = 0800;
117118
};
118119
};
119120
};
@@ -257,6 +258,7 @@
257258
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
258259
PRODUCT_NAME = "$(TARGET_NAME)";
259260
SKIP_INSTALL = YES;
261+
SWIFT_VERSION = 2.3;
260262
};
261263
name = Debug;
262264
};
@@ -274,6 +276,7 @@
274276
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
275277
PRODUCT_NAME = "$(TARGET_NAME)";
276278
SKIP_INSTALL = YES;
279+
SWIFT_VERSION = 2.3;
277280
};
278281
name = Release;
279282
};

SideMenu/MenuTransitionAnimator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ public class MenuTransitionAnimator: NSObject {
3636
view.translatesAutoresizingMaskIntoConstraints = true
3737

3838
if shouldPassEventsOutsideMenu == true {
39-
context.containerView()!.frame = view.frame
39+
context.containerView().frame = view.frame
4040
} else {
4141
let tapButton = UIButton(frame: host.view.frame)
4242
tapButton.backgroundColor = UIColor.clearColor()
4343
tapButton.addTarget(self, action: #selector(menuTappedOutside), forControlEvents: .TouchUpInside)
44-
context.containerView()!.addSubview(tapButton)
44+
context.containerView().addSubview(tapButton)
4545
}
4646

47-
context.containerView()!.addSubview(view)
47+
context.containerView().addSubview(view)
4848

4949
animateMenu(menu as! Menu, startAngle: angle, endAngle: 0) {
5050
context.completeTransition(true)

0 commit comments

Comments
 (0)