Unverified Commit 20e8d297 authored by Zach Knox's avatar Zach Knox
Browse files

Failed status bar fixes and a fixed GestureRecognizer

Technically the recognizer worked before but it threw a bunch of scary warnings at me at runtime so I've made it 'the right way'
parent ffa8d7c2
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Workspace <Workspace
version = "1.0"> version = "1.0">
<FileRef
location = "group:/Users/zach/Development/SRCT/WhatsOpeniOS/WhatsOpen/WhatsOpen/Views/CardViewController.swift">
</FileRef>
<FileRef <FileRef
location = "group:WhatsOpen.xcodeproj"> location = "group:WhatsOpen.xcodeproj">
</FileRef> </FileRef>
......
...@@ -229,14 +229,12 @@ ...@@ -229,14 +229,12 @@
<outlet property="nameLabel" destination="6QR-8Q-n4s" id="Nbh-eh-fDp"/> <outlet property="nameLabel" destination="6QR-8Q-n4s" id="Nbh-eh-fDp"/>
<outlet property="openClosedLabel" destination="DEx-BH-Fun" id="9dP-3e-Hcy"/> <outlet property="openClosedLabel" destination="DEx-BH-Fun" id="9dP-3e-Hcy"/>
<outlet property="timeDescriptionLabel" destination="o7N-To-w50" id="gAW-xD-mws"/> <outlet property="timeDescriptionLabel" destination="o7N-To-w50" id="gAW-xD-mws"/>
<outletCollection property="gestureRecognizers" destination="nBx-MW-HhP" appends="YES" id="50g-h6-wdr"/>
</connections> </connections>
</collectionViewCell> </collectionViewCell>
</cells> </cells>
<connections> <connections>
<outlet property="dataSource" destination="aaB-Go-aWd" id="bX7-L2-MmS"/> <outlet property="dataSource" destination="aaB-Go-aWd" id="bX7-L2-MmS"/>
<outlet property="delegate" destination="aaB-Go-aWd" id="dre-Tj-BHj"/> <outlet property="delegate" destination="aaB-Go-aWd" id="dre-Tj-BHj"/>
<outletCollection property="gestureRecognizers" destination="nBx-MW-HhP" appends="YES" id="47R-R2-9Tc"/>
</connections> </connections>
</collectionView> </collectionView>
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8FA-yc-q3z"> <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8FA-yc-q3z">
...@@ -294,7 +292,7 @@ ...@@ -294,7 +292,7 @@
<action selector="favoritesControlChanges:" destination="aaB-Go-aWd" eventType="valueChanged" id="5Ij-Z9-Gsa"/> <action selector="favoritesControlChanges:" destination="aaB-Go-aWd" eventType="valueChanged" id="5Ij-Z9-Gsa"/>
</connections> </connections>
</segmentedControl> </segmentedControl>
<barButtonItem key="rightBarButtonItem" systemItem="play" id="vtX-VZ-RB4"> <barButtonItem key="rightBarButtonItem" title=" " id="vtX-VZ-RB4">
<color key="tintColor" red="0.0" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/> <color key="tintColor" red="0.0" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<connections> <connections>
<action selector="RightButton:" destination="aaB-Go-aWd" id="47Y-7w-MFS"/> <action selector="RightButton:" destination="aaB-Go-aWd" id="47Y-7w-MFS"/>
...@@ -313,11 +311,6 @@ ...@@ -313,11 +311,6 @@
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="cQW-T4-yZv" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="cQW-T4-yZv" userLabel="First Responder" sceneMemberID="firstResponder"/>
<tapGestureRecognizer id="nBx-MW-HhP">
<connections>
<action selector="tapRecognizer:" destination="aaB-Go-aWd" id="f3y-Nf-sIn"/>
</connections>
</tapGestureRecognizer>
</objects> </objects>
<point key="canvasLocation" x="-8151.1999999999998" y="-1884.1079460269866"/> <point key="canvasLocation" x="-8151.1999999999998" y="-1884.1079460269866"/>
</scene> </scene>
...@@ -468,7 +461,7 @@ ...@@ -468,7 +461,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iGy-3K-QIj"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iGy-3K-QIj">
<rect key="frame" x="0.0" y="0.0" width="375" height="125"/> <rect key="frame" x="0.0" y="0.0" width="375" height="153"/>
<subviews> <subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iBi-Ak-BGa"> <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iBi-Ak-BGa">
<rect key="frame" x="296" y="111" width="22" height="22"/> <rect key="frame" x="296" y="111" width="22" height="22"/>
...@@ -494,7 +487,7 @@ ...@@ -494,7 +487,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="OPEN" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BoH-CV-Nfo"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="OPEN" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BoH-CV-Nfo">
<rect key="frame" x="8" y="87" width="359" height="38"/> <rect key="frame" x="8" y="98" width="359" height="38"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="359" id="0gt-6q-O5J"/> <constraint firstAttribute="width" constant="359" id="0gt-6q-O5J"/>
...@@ -510,10 +503,10 @@ ...@@ -510,10 +503,10 @@
<constraint firstItem="jN2-Me-tgL" firstAttribute="leading" secondItem="W3q-KN-OAm" secondAttribute="leading" id="1bC-oQ-ps6"/> <constraint firstItem="jN2-Me-tgL" firstAttribute="leading" secondItem="W3q-KN-OAm" secondAttribute="leading" id="1bC-oQ-ps6"/>
<constraint firstItem="XpV-B3-ImX" firstAttribute="top" secondItem="W3q-KN-OAm" secondAttribute="bottom" constant="-7" id="4OC-Nd-n02"/> <constraint firstItem="XpV-B3-ImX" firstAttribute="top" secondItem="W3q-KN-OAm" secondAttribute="bottom" constant="-7" id="4OC-Nd-n02"/>
<constraint firstItem="W3q-KN-OAm" firstAttribute="top" secondItem="jN2-Me-tgL" secondAttribute="bottom" constant="-7" id="7Jg-7u-U9T"/> <constraint firstItem="W3q-KN-OAm" firstAttribute="top" secondItem="jN2-Me-tgL" secondAttribute="bottom" constant="-7" id="7Jg-7u-U9T"/>
<constraint firstAttribute="bottom" secondItem="BoH-CV-Nfo" secondAttribute="bottom" id="7oP-Gu-bwQ"/> <constraint firstAttribute="bottom" secondItem="BoH-CV-Nfo" secondAttribute="bottom" constant="17" id="7oP-Gu-bwQ"/>
<constraint firstItem="BoH-CV-Nfo" firstAttribute="centerX" secondItem="iGy-3K-QIj" secondAttribute="centerX" id="Eun-PC-ZhH"/> <constraint firstItem="BoH-CV-Nfo" firstAttribute="centerX" secondItem="iGy-3K-QIj" secondAttribute="centerX" id="Eun-PC-ZhH"/>
<constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="G4x-mF-Mkj"/> <constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="G4x-mF-Mkj"/>
<constraint firstAttribute="bottom" secondItem="BoH-CV-Nfo" secondAttribute="bottom" id="KN9-mj-yqu"/> <constraint firstAttribute="bottom" secondItem="BoH-CV-Nfo" secondAttribute="bottom" constant="17" id="KN9-mj-yqu"/>
<constraint firstAttribute="trailing" secondItem="W3q-KN-OAm" secondAttribute="trailing" constant="8" id="Lvv-8h-XlP"/> <constraint firstAttribute="trailing" secondItem="W3q-KN-OAm" secondAttribute="trailing" constant="8" id="Lvv-8h-XlP"/>
<constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leadingMargin" id="Mlo-Ux-Pkw"/> <constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leadingMargin" id="Mlo-Ux-Pkw"/>
<constraint firstItem="W3q-KN-OAm" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="OgW-CL-tnu"/> <constraint firstItem="W3q-KN-OAm" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="OgW-CL-tnu"/>
...@@ -522,14 +515,14 @@ ...@@ -522,14 +515,14 @@
<constraint firstAttribute="trailing" secondItem="BoH-CV-Nfo" secondAttribute="trailing" constant="8" id="cm2-Fd-03J"/> <constraint firstAttribute="trailing" secondItem="BoH-CV-Nfo" secondAttribute="trailing" constant="8" id="cm2-Fd-03J"/>
<constraint firstItem="BoH-CV-Nfo" firstAttribute="trailing" secondItem="iGy-3K-QIj" secondAttribute="trailingMargin" id="kYt-5A-J7x"/> <constraint firstItem="BoH-CV-Nfo" firstAttribute="trailing" secondItem="iGy-3K-QIj" secondAttribute="trailingMargin" id="kYt-5A-J7x"/>
<constraint firstItem="XpV-B3-ImX" firstAttribute="width" secondItem="W3q-KN-OAm" secondAttribute="width" id="ogF-Oz-euc"/> <constraint firstItem="XpV-B3-ImX" firstAttribute="width" secondItem="W3q-KN-OAm" secondAttribute="width" id="ogF-Oz-euc"/>
<constraint firstItem="BoH-CV-Nfo" firstAttribute="top" secondItem="iGy-3K-QIj" secondAttribute="top" constant="87" id="uw6-cw-Ojt"/> <constraint firstItem="BoH-CV-Nfo" firstAttribute="top" secondItem="iGy-3K-QIj" secondAttribute="top" constant="98" id="uw6-cw-Ojt"/>
<constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="wfU-XJ-9YM"/> <constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="wfU-XJ-9YM"/>
<constraint firstItem="W3q-KN-OAm" firstAttribute="leading" secondItem="XpV-B3-ImX" secondAttribute="leading" id="xKh-GM-PQn"/> <constraint firstItem="W3q-KN-OAm" firstAttribute="leading" secondItem="XpV-B3-ImX" secondAttribute="leading" id="xKh-GM-PQn"/>
<constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="ylN-rR-4f8"/> <constraint firstItem="BoH-CV-Nfo" firstAttribute="leading" secondItem="iGy-3K-QIj" secondAttribute="leading" constant="8" id="ylN-rR-4f8"/>
</constraints> </constraints>
</view> </view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="N1f-XR-xpn"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="N1f-XR-xpn">
<rect key="frame" x="0.0" y="125" width="375" height="542"/> <rect key="frame" x="0.0" y="153" width="375" height="514"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="LocationDetailCell" textLabel="dvE-Be-8y6" detailTextLabel="fSJ-Gc-VIw" style="IBUITableViewCellStyleValue1" id="bCL-Iy-li3"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="LocationDetailCell" textLabel="dvE-Be-8y6" detailTextLabel="fSJ-Gc-VIw" style="IBUITableViewCellStyleValue1" id="bCL-Iy-li3">
...@@ -587,7 +580,7 @@ ...@@ -587,7 +580,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yn4-Px-X4z" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="yn4-Px-X4z" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="-6372" y="-1886"/> <point key="canvasLocation" x="-6372" y="-1886.8065967016494"/>
</scene> </scene>
<!--Root Navigation--> <!--Root Navigation-->
<scene sceneID="WBs-Vx-0Yx"> <scene sceneID="WBs-Vx-0Yx">
......
...@@ -14,6 +14,7 @@ class FacilityCollectionViewCell: UICollectionViewCell { ...@@ -14,6 +14,7 @@ class FacilityCollectionViewCell: UICollectionViewCell {
@IBOutlet var timeDescriptionLabel: UILabel! @IBOutlet var timeDescriptionLabel: UILabel!
@IBOutlet var openClosedLabel: UILabel! @IBOutlet var openClosedLabel: UILabel!
var facility: Facility! var facility: Facility!
internal let tapRecognizer: UITapGestureRecognizer = UITapGestureRecognizer()
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
......
...@@ -44,6 +44,6 @@ ...@@ -44,6 +44,6 @@
<string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationPortraitUpsideDown</string>
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <true/>
</dict> </dict>
</plist> </plist>
...@@ -13,6 +13,10 @@ class AboutScreenViewController: UIViewController, UITableViewDelegate, UITableV ...@@ -13,6 +13,10 @@ class AboutScreenViewController: UIViewController, UITableViewDelegate, UITableV
@IBOutlet var versionLabel: UILabel! @IBOutlet var versionLabel: UILabel!
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
......
...@@ -14,6 +14,10 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate, ...@@ -14,6 +14,10 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
var facilitiesArray = Array<Facility>() var facilitiesArray = Array<Facility>()
var filters = Filters() var filters = Filters()
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default
}
@IBOutlet var LeftButton: UIBarButtonItem! @IBOutlet var LeftButton: UIBarButtonItem!
@IBAction func RightButton(_ sender: Any) { @IBAction func RightButton(_ sender: Any) {
...@@ -80,7 +84,7 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate, ...@@ -80,7 +84,7 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
} }
@IBAction func tapRecognizer(_ sender: UITapGestureRecognizer) { func tapRecognizer(_ sender: UITapGestureRecognizer) {
let tapLocation = sender.location(in: LocationsList) let tapLocation = sender.location(in: LocationsList)
let indexPath = LocationsList.indexPathForItem(at: tapLocation) let indexPath = LocationsList.indexPathForItem(at: tapLocation)
...@@ -193,7 +197,9 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate, ...@@ -193,7 +197,9 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
cell.frame.size.width = 280 cell.frame.size.width = 280
} }
*/ */
cell.tapRecognizer.addTarget(self, action: #selector(FacilitiesListViewController.tapRecognizer(_:)))
cell.gestureRecognizers = []
cell.gestureRecognizers?.append(cell.tapRecognizer)
let dataArray = placeOpenFacilitiesFirstInArray(facilitiesArray) let dataArray = placeOpenFacilitiesFirstInArray(facilitiesArray)
let facility = dataArray[indexPath.row] let facility = dataArray[indexPath.row]
cell.facility = facility cell.facility = facility
......
...@@ -10,6 +10,10 @@ import UIKit ...@@ -10,6 +10,10 @@ import UIKit
class FiltersTableViewController: UITableViewController { class FiltersTableViewController: UITableViewController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default
}
@IBAction func doneButton(_ sender: Any) { @IBAction func doneButton(_ sender: Any) {
self.dismiss(animated: true, completion: nil) self.dismiss(animated: true, completion: nil)
} }
......
...@@ -12,6 +12,10 @@ import MessageUI ...@@ -12,6 +12,10 @@ import MessageUI
class SettingsTableViewController: UITableViewController { class SettingsTableViewController: UITableViewController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default
}
@IBAction func doneButton(_ sender: Any) { @IBAction func doneButton(_ sender: Any) {
self.dismiss(animated: true, completion: nil) self.dismiss(animated: true, completion: nil)
} }
......
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