Unverified Commit 07159834 authored by Zach Knox's avatar Zach Knox
Browse files

3D touch rollback

parent 95497c7a
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.1</string> <string>1.1</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>36</string> <string>37</string>
<key>Fabric</key> <key>Fabric</key>
<dict> <dict>
<key>APIKey</key> <key>APIKey</key>
......
...@@ -297,7 +297,11 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate, ...@@ -297,7 +297,11 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
nc.addObserver(self, selector: #selector(anyRefresh(_:)), name: .UIApplicationWillEnterForeground, object: nil) nc.addObserver(self, selector: #selector(anyRefresh(_:)), name: .UIApplicationWillEnterForeground, object: nil)
self.definesPresentationContext = true self.definesPresentationContext = true
if(traitCollection.forceTouchCapability == .available) {
registerForPreviewing(with: self, sourceView: self.LocationsList!)
}
navigationItem.title = "What's Open" navigationItem.title = "What's Open"
navigationController?.navigationBar.prefersLargeTitles = true navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always navigationItem.largeTitleDisplayMode = .always
...@@ -744,10 +748,7 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate, ...@@ -744,10 +748,7 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
cell.layer.masksToBounds = false cell.layer.masksToBounds = false
cell.layer.shadowPath = UIBezierPath(roundedRect: cell.bounds, cornerRadius: cell.layer.cornerRadius).cgPath cell.layer.shadowPath = UIBezierPath(roundedRect: cell.bounds, cornerRadius: cell.layer.cornerRadius).cgPath
self.reloadInputViews() self.reloadInputViews()
if(traitCollection.forceTouchCapability == .available) {
self.registerForPreviewing(with: self, sourceView: cell)
}
return cell return cell
} }
else { else {
...@@ -778,9 +779,6 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate, ...@@ -778,9 +779,6 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
} }
cell.messageLabel.text = currentAlerts[indexPath.row].message cell.messageLabel.text = currentAlerts[indexPath.row].message
if(traitCollection.forceTouchCapability == .available) {
self.registerForPreviewing(with: self, sourceView: cell)
}
return cell return cell
} }
...@@ -937,7 +935,6 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate, ...@@ -937,7 +935,6 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
guard let indexPath = LocationsList?.indexPathForItem(at: location) else { return nil } guard let indexPath = LocationsList?.indexPathForItem(at: location) else { return nil }
if(indexPath.section == 1 || currentAlerts.count == 0) { if(indexPath.section == 1 || currentAlerts.count == 0) {
let cell = LocationsList?.cellForItem(at: indexPath) as? FacilityCollectionViewCell let cell = LocationsList?.cellForItem(at: indexPath) as? FacilityCollectionViewCell
previewingContext.sourceRect = (cell?.bounds)!
guard let detailView = storyboard?.instantiateViewController(withIdentifier: "detailView") as? FacilityDetailViewController else { return nil } guard let detailView = storyboard?.instantiateViewController(withIdentifier: "detailView") as? FacilityDetailViewController else { return nil }
detailView.facility = cell?.facility detailView.facility = cell?.facility
return detailView return detailView
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment