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

don't show things in brackets

parent 0e0cfa40
......@@ -163,9 +163,9 @@
<rect key="frame" x="0.0" y="0.0" width="300" height="131"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Closes in 2 hours" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.84999999999999998" translatesAutoresizingMaskIntoConstraints="NO" id="o7N-To-w50">
<rect key="frame" x="11" y="58" width="278" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Closes in 2 hours" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="o7N-To-w50">
<rect key="frame" x="11" y="58" width="278" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
......@@ -616,7 +616,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="OPEN" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LmU-tN-3Nq">
<rect key="frame" x="8" y="114" width="359" height="38"/>
<rect key="frame" x="8" y="117.5" width="359" height="38"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="9W6-hU-MSZ"/>
......@@ -626,8 +626,8 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Johnson Center" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2ce-lS-NfW">
<rect key="frame" x="8" y="82" width="359" height="24"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<rect key="frame" x="8" y="82" width="359" height="27.5"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="23"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
......@@ -644,7 +644,7 @@
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="EFr-sK-Oua">
<rect key="frame" x="0.0" y="160" width="375" height="436"/>
<rect key="frame" x="0.0" y="163.5" width="375" height="432.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="LocationDetailCell" textLabel="ZON-E8-nep" detailTextLabel="mCu-om-Ac6" style="IBUITableViewCellStyleValue1" id="7ju-Kj-S2Y">
......
......@@ -595,7 +595,12 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
cell.facility = facility
//set labels
cell.nameLabel.text = facility.facilityName
var name = facility.facilityName
let separator = name.index(of: "[")
if separator != nil {
name = String(name[..<separator!]).replacingOccurrences(of: "\\s+$",with: "", options: .regularExpression)
}
cell.nameLabel.text = name
cell.categoryLabel.text = facility.category?.categoryName.uppercased()
cell.openClosedLabel.text = Utilities.openOrClosedUntil(facility)
......
......@@ -73,7 +73,12 @@ class FacilityDetailViewController: UIViewController, UITableViewDelegate, UITab
modalPresentationCapturesStatusBarAppearance = true
NameLabel.text = facility.facilityName
var name = facility.facilityName
let separator = name.index(of: "[")
if separator != nil {
name = String(name[..<separator!]).replacingOccurrences(of: "\\s+$",with: "", options: .regularExpression)
}
NameLabel.text = name
PlaceLabel.text = facility.facilityLocation!.building
CategoryLabel.text = facility.category?.categoryName.uppercased()
......
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