Commit b172cfc0 authored by Zach Knox's avatar Zach Knox
Browse files

Merge branch '18-alerts' into 'dev-0.0'

Resolve "Add ability to show unobtrusive alerts which will be added in the upstream API"

See merge request !19
parents 6cfb20ae a5f3204a
......@@ -24,6 +24,7 @@
92EA81971FB7D1B500B1F6E3 /* PaddedUILabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EA81961FB7D1B500B1F6E3 /* PaddedUILabel.swift */; };
92F681581FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 92F681571FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist */; };
92F6815A1FC137CF00393DF4 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 92F681591FC137CF00393DF4 /* Settings.bundle */; };
92FF6C731FFEEEE900D836AE /* AlertCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92FF6C721FFEEEE900D836AE /* AlertCollectionViewCell.swift */; };
CD3C97491DC18AB300A84434 /* SRCTNetworkController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */; };
CD466DD21DC12E1200E44DF5 /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */; };
CD763A7A1DE24EF100ADFD6B /* examplejson.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD763A791DE24EF100ADFD6B /* examplejson.swift */; };
......@@ -67,6 +68,7 @@
92EA81961FB7D1B500B1F6E3 /* PaddedUILabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PaddedUILabel.swift; path = WhatsOpen/PaddedUILabel.swift; sourceTree = SOURCE_ROOT; };
92F681571FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Pods-WhatsOpen-acknowledgements.plist"; path = "Pods/Target Support Files/Pods-WhatsOpen/Pods-WhatsOpen-acknowledgements.plist"; sourceTree = SOURCE_ROOT; };
92F681591FC137CF00393DF4 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
92FF6C721FFEEEE900D836AE /* AlertCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AlertCollectionViewCell.swift; path = WhatsOpen/AlertCollectionViewCell.swift; sourceTree = SOURCE_ROOT; };
CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SRCTNetworkController.swift; sourceTree = "<group>"; };
CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTableViewController.swift; sourceTree = "<group>"; };
CD763A791DE24EF100ADFD6B /* examplejson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = examplejson.swift; path = "Object Model/examplejson.swift"; sourceTree = "<group>"; };
......@@ -166,6 +168,7 @@
92EA81961FB7D1B500B1F6E3 /* PaddedUILabel.swift */,
CD81F5201DC0334600009FBD /* Main.storyboard */,
929157211FF4662F00ED63C7 /* PickingTableViewCell.swift */,
92FF6C721FFEEEE900D836AE /* AlertCollectionViewCell.swift */,
920D17961F6C5CD200D63295 /* Views */,
CD81F5231DC0334600009FBD /* Assets.xcassets */,
CD81F5251DC0334600009FBD /* LaunchScreen.storyboard */,
......@@ -253,7 +256,7 @@
};
CD81F5181DC0334600009FBD = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = K5MMVK2UFR;
DevelopmentTeam = N5GM564QWL;
LastSwiftMigration = 0910;
ProvisioningStyle = Automatic;
};
......@@ -376,6 +379,7 @@
92B2D2FF1FF8599500349E90 /* FilterSelectionTableViewController.swift in Sources */,
92182EC41E95C38400192ABA /* FacilityDetailViewController.swift in Sources */,
929157221FF4662F00ED63C7 /* PickingTableViewCell.swift in Sources */,
92FF6C731FFEEEE900D836AE /* AlertCollectionViewCell.swift in Sources */,
92108A331ED755F100675E16 /* CheckingTableViewCell.swift in Sources */,
92182EC01E95BD2C00192ABA /* FacilitiesListViewController.swift in Sources */,
CD763A7A1DE24EF100ADFD6B /* examplejson.swift in Sources */,
......
//
// AlertCollectionViewCell.swift
// WhatsOpen
//
// Created by Zach Knox on 1/4/18.
// Copyright © 2018 SRCT. All rights reserved.
//
import UIKit
class AlertCollectionViewCell: UICollectionViewCell {
@IBOutlet var imageView: UIImageView!
@IBOutlet var messageLabel: UILabel!
@IBOutlet var containingView: UIView!
@IBOutlet var containingViewWidth: NSLayoutConstraint!
var viewWidth: CGFloat!
override func awakeFromNib() {
super.awakeFromNib()
isAccessibilityElement = true
shouldGroupAccessibilityChildren = true
setNeedsLayout()
}
override func layoutSubviews() {
super.layoutSubviews()
if(viewWidth < 640) {
containingViewWidth.constant = -30
//cell.containingView.widthAnchor.constraint(equalTo: cell.widthAnchor, multiplier: 1, constant: -10)
}
else if(viewWidth >= 640 && viewWidth < 1024) {
containingViewWidth.constant = -100
//cell.containingView.widthAnchor.constraint(equalTo: cell.widthAnchor, multiplier: 1, constant: -100)
}
else if(viewWidth >= 1024) {
containingViewWidth.constant = -300
//cell.containingView.widthAnchor.constraint(equalTo: cell.widthAnchor, multiplier: 1, constant: -150)
}
else {
containingViewWidth.constant = -10
//cell.containingView.widthAnchor.constraint(equalTo: cell.widthAnchor, multiplier: 1, constant: -10)
}
}
}
......@@ -7,6 +7,7 @@
//
import UIKit
import RealmSwift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
......@@ -16,6 +17,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "emergency.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "emergency@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "emergency@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "info.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "info@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "info@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "major.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "major@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "major@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "warning.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "warning@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "warning@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -234,6 +235,57 @@
<outlet property="timeDescriptionLabel" destination="o7N-To-w50" id="gAW-xD-mws"/>
</connections>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Alert Cell" id="RlS-h3-WtZ" customClass="AlertCollectionViewCell" customModule="WhatsOpen" customModuleProvider="target">
<rect key="frame" x="37.5" y="148" width="300" height="131"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
<rect key="frame" x="0.0" y="0.0" width="300" height="131"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S4r-K0-38K">
<rect key="frame" x="0.5" y="1" width="300" height="128"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alert Text" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" minimumScaleFactor="0.75" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2Ns-M7-OG1">
<rect key="frame" x="72" y="8" width="228" height="112"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Oab-U6-xpF">
<rect key="frame" x="0.0" y="32" width="64" height="64"/>
<constraints>
<constraint firstAttribute="height" constant="64" id="D8k-fI-v4K"/>
<constraint firstAttribute="width" constant="64" id="FVc-XG-Cdz"/>
<constraint firstAttribute="width" secondItem="Oab-U6-xpF" secondAttribute="height" multiplier="1:1" id="oGq-If-eyX"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstItem="2Ns-M7-OG1" firstAttribute="top" secondItem="S4r-K0-38K" secondAttribute="top" constant="8" id="72c-BL-1gb"/>
<constraint firstItem="2Ns-M7-OG1" firstAttribute="leading" secondItem="Oab-U6-xpF" secondAttribute="trailing" constant="8" id="97x-ge-os6"/>
<constraint firstItem="Oab-U6-xpF" firstAttribute="leading" secondItem="S4r-K0-38K" secondAttribute="leading" id="KJK-vc-7N5"/>
<constraint firstAttribute="trailing" secondItem="2Ns-M7-OG1" secondAttribute="trailing" id="StY-Dp-GaW"/>
<constraint firstItem="Oab-U6-xpF" firstAttribute="centerY" secondItem="S4r-K0-38K" secondAttribute="centerY" id="UnJ-FG-F23"/>
<constraint firstItem="2Ns-M7-OG1" firstAttribute="bottom" secondItem="S4r-K0-38K" secondAttribute="bottom" constant="-8" id="c9J-HY-QWj"/>
</constraints>
</view>
</subviews>
</view>
<color key="backgroundColor" white="0.21742078993055555" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="S4r-K0-38K" firstAttribute="centerX" secondItem="RlS-h3-WtZ" secondAttribute="centerX" id="DAa-g9-pyb"/>
<constraint firstItem="S4r-K0-38K" firstAttribute="centerY" secondItem="RlS-h3-WtZ" secondAttribute="centerY" id="P2z-Aq-USK"/>
<constraint firstItem="S4r-K0-38K" firstAttribute="width" secondItem="RlS-h3-WtZ" secondAttribute="width" id="RTU-nN-RCt"/>
<constraint firstItem="S4r-K0-38K" firstAttribute="top" secondItem="RlS-h3-WtZ" secondAttribute="top" constant="1" id="fH8-Io-0p4"/>
<constraint firstAttribute="bottom" secondItem="S4r-K0-38K" secondAttribute="bottom" constant="2" id="uWj-h9-AHl"/>
</constraints>
<connections>
<outlet property="containingView" destination="S4r-K0-38K" id="iLl-66-60S"/>
<outlet property="containingViewWidth" destination="RTU-nN-RCt" id="yqn-hj-ahE"/>
<outlet property="imageView" destination="Oab-U6-xpF" id="zUI-Ac-2nk"/>
<outlet property="messageLabel" destination="2Ns-M7-OG1" id="ubW-8f-ewB"/>
</connections>
</collectionViewCell>
</cells>
<connections>
<outlet property="dataSource" destination="aaB-Go-aWd" id="bX7-L2-MmS"/>
......@@ -295,19 +347,12 @@
<action selector="favoritesControlChanges:" destination="aaB-Go-aWd" eventType="valueChanged" id="5Ij-Z9-Gsa"/>
</connections>
</segmentedControl>
<barButtonItem key="rightBarButtonItem" title=" " id="vtX-VZ-RB4">
<color key="tintColor" red="0.0" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<action selector="RightButton:" destination="aaB-Go-aWd" id="47Y-7w-MFS"/>
</connections>
</barButtonItem>
</navigationItem>
<connections>
<outlet property="LastUpdatedLabel" destination="y4Z-i6-UYu" id="zCz-7O-cP3"/>
<outlet property="LeftButton" destination="v4j-oA-7Fa" id="EdI-if-QoB"/>
<outlet property="LocationsList" destination="naC-sZ-bcy" id="Wk4-kY-TeR"/>
<outlet property="LocationsListLayout" destination="eqw-AF-DSB" id="kLH-bz-bdn"/>
<outlet property="RightButton" destination="vtX-VZ-RB4" id="iv8-Xb-WoJ"/>
<outlet property="favoritesControl" destination="9BX-Nz-NN6" id="94S-gq-Nni"/>
<outlet property="navigationItem" destination="lS5-pu-Adr" id="4tw-ID-qgg"/>
<outlet property="settingsButton" destination="MHZ-t0-Moj" id="nyC-iO-GTe"/>
......
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