Skip to content

Commit 82ea3e9

Browse files
committed
Merge pull request #6 from albinekcom/master
Update to Swift 2.2
2 parents ff762af + 62b3958 commit 82ea3e9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ReplaceAnimation/MailButton.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ class MailButton: UIButton {
108108
}
109109

110110
private func addTargets() {
111-
self.addTarget(self, action: "touchDown:", forControlEvents: UIControlEvents.TouchDown)
112-
self.addTarget(self, action: "touchUpInside:", forControlEvents: UIControlEvents.TouchUpInside)
113-
self.addTarget(self, action: "touchDragExit:", forControlEvents: UIControlEvents.TouchDragExit)
114-
self.addTarget(self, action: "touchDragEnter:", forControlEvents: UIControlEvents.TouchDragEnter)
115-
self.addTarget(self, action: "touchCancel:", forControlEvents: UIControlEvents.TouchCancel)
111+
self.addTarget(self, action: #selector(MailButton.touchDown(_:)), forControlEvents: UIControlEvents.TouchDown)
112+
self.addTarget(self, action: #selector(MailButton.touchUpInside(_:)), forControlEvents: UIControlEvents.TouchUpInside)
113+
self.addTarget(self, action: #selector(MailButton.touchDragExit(_:)), forControlEvents: UIControlEvents.TouchDragExit)
114+
self.addTarget(self, action: #selector(MailButton.touchDragEnter(_:)), forControlEvents: UIControlEvents.TouchDragEnter)
115+
self.addTarget(self, action: #selector(MailButton.touchCancel(_:)), forControlEvents: UIControlEvents.TouchCancel)
116116
}
117117

118118
internal func touchDown(sender: MailButton) {

ReplaceAnimation/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class ViewController: UICollectionViewController {
6767
layout.parallaxHeaderAlwaysOnTop = true
6868
layout.disableStickyHeaders = true
6969
self.collectionView?.collectionViewLayout = layout
70-
self.collectionView?.panGestureRecognizer.addTarget(self, action: Selector("handlePan:"))
70+
self.collectionView?.panGestureRecognizer.addTarget(self, action: #selector(ViewController.handlePan(_:)))
7171
}
7272

7373
threshold = -floor(0.3 * screenBounds.width)

0 commit comments

Comments
 (0)