Skip to content

Commit

Permalink
Merge pull request #21 from sgr-ksmt/release/1.1.1
Browse files Browse the repository at this point in the history
Release/1.1.1
  • Loading branch information
sgr-ksmt authored Feb 12, 2017
2 parents b4e9cd8 + 8295bdd commit 2f93b12
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
13 changes: 2 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# CHANGELOG
### v1.1.1
- Fixed crash problem using WKWebView's scrollview. #18

## *Unreleased*

#### Added

#### Removed

#### Updated

#### Fixed

## **Released**
### v1.1
#### Added
- Edge shadow #9
Expand Down
2 changes: 1 addition & 1 deletion PullToDismiss.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "PullToDismiss"
s.version = "1.1"
s.version = "1.1.1"
s.summary = "Dismiss ViewController by pulling scroll view or navigation bar in Swift."
s.homepage = "https://github.com/sgr-ksmt/PullToDismiss"
# s.screenshots = ""
Expand Down
5 changes: 5 additions & 0 deletions Sources/PullToDismiss.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ open class PullToDismiss: NSObject {
fileprivate var previousContentOffsetY: CGFloat = 0.0
fileprivate weak var viewController: UIViewController?

private var __scrollView: UIScrollView?
private var panGesture: UIPanGestureRecognizer?
private var backgroundView: UIView?
private var navigationBarHeight: CGFloat = 0.0
Expand All @@ -47,6 +48,7 @@ open class PullToDismiss: NSObject {
public init(scrollView: UIScrollView, viewController: UIViewController, navigationBar: UIView? = nil) {
super.init()
scrollView.delegate = self
__scrollView = scrollView
self.viewController = viewController
if let navigationBar = navigationBar ?? viewController.navigationController?.navigationBar {
let gesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanGesture(_:)))
Expand All @@ -60,6 +62,9 @@ open class PullToDismiss: NSObject {
if let panGesture = panGesture {
panGesture.view?.removeGestureRecognizer(panGesture)
}

__scrollView?.delegate = nil
__scrollView = nil
}

fileprivate var targetViewController: UIViewController? {
Expand Down

0 comments on commit 2f93b12

Please sign in to comment.