From f5228454082f6d2067c772c25aa4ba9155a0b2a4 Mon Sep 17 00:00:00 2001 From: Adam Zvada <zvadaada@gmail.com> Date: Thu, 26 Apr 2018 03:30:17 +0200 Subject: [PATCH] added report screen --- Eglaf.xcodeproj/project.pbxproj | 8 + .../Report/CategoryCollectionViewCell.swift | 41 +++++ .../Report/CategoryCollectionViewCell.xib | 60 +++++++ .../Report/ReportViewController.swift | 158 ++++++++++++++++-- .../ReportViewController.storyboard | 109 +++++++++++- 5 files changed, 353 insertions(+), 23 deletions(-) create mode 100644 Eglaf/Controllers/Report/CategoryCollectionViewCell.swift create mode 100644 Eglaf/Controllers/Report/CategoryCollectionViewCell.xib diff --git a/Eglaf.xcodeproj/project.pbxproj b/Eglaf.xcodeproj/project.pbxproj index 32eb90e..8a7191e 100644 --- a/Eglaf.xcodeproj/project.pbxproj +++ b/Eglaf.xcodeproj/project.pbxproj @@ -23,6 +23,8 @@ C556C3E920912221002E582C /* Issue.swift in Sources */ = {isa = PBXBuildFile; fileRef = C556C3E820912221002E582C /* Issue.swift */; }; C556C3EC209124BF002E582C /* SF-Pro-Display-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = C556C3EA20912479002E582C /* SF-Pro-Display-Bold.otf */; }; C556C3ED209124BF002E582C /* SF-Pro-Display-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = C556C3EB20912489002E582C /* SF-Pro-Display-Regular.otf */; }; + C556C3F820915A7C002E582C /* CategoryCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C556C3F620915A7C002E582C /* CategoryCollectionViewCell.swift */; }; + C556C3F920915A7C002E582C /* CategoryCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C556C3F720915A7C002E582C /* CategoryCollectionViewCell.xib */; }; C5C26C952085240A006448EF /* DBProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5C26C942085240A006448EF /* DBProvider.swift */; }; C5C26C982085244F006448EF /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5C26C972085244F006448EF /* Constants.swift */; }; C5C26C9A20852502006448EF /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C5C26C9920852502006448EF /* GoogleService-Info.plist */; }; @@ -56,6 +58,8 @@ C556C3E820912221002E582C /* Issue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Issue.swift; sourceTree = "<group>"; }; C556C3EA20912479002E582C /* SF-Pro-Display-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Display-Bold.otf"; sourceTree = "<group>"; }; C556C3EB20912489002E582C /* SF-Pro-Display-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Display-Regular.otf"; sourceTree = "<group>"; }; + C556C3F620915A7C002E582C /* CategoryCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryCollectionViewCell.swift; sourceTree = "<group>"; }; + C556C3F720915A7C002E582C /* CategoryCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CategoryCollectionViewCell.xib; sourceTree = "<group>"; }; C5C26C942085240A006448EF /* DBProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DBProvider.swift; sourceTree = "<group>"; }; C5C26C972085244F006448EF /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; }; C5C26C9920852502006448EF /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; }; @@ -103,6 +107,8 @@ isa = PBXGroup; children = ( C50195032091100C00F81D9B /* ReportViewController.swift */, + C556C3F620915A7C002E582C /* CategoryCollectionViewCell.swift */, + C556C3F720915A7C002E582C /* CategoryCollectionViewCell.xib */, ); path = Report; sourceTree = "<group>"; @@ -316,6 +322,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + C556C3F920915A7C002E582C /* CategoryCollectionViewCell.xib in Resources */, C556C3EC209124BF002E582C /* SF-Pro-Display-Bold.otf in Resources */, C556C3ED209124BF002E582C /* SF-Pro-Display-Regular.otf in Resources */, C5DBF2F12058834300FFA015 /* LaunchScreen.storyboard in Resources */, @@ -392,6 +399,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + C556C3F820915A7C002E582C /* CategoryCollectionViewCell.swift in Sources */, C501950A209110BE00F81D9B /* IssueTableViewCell.swift in Sources */, C50195042091100C00F81D9B /* ReportViewController.swift in Sources */, C5C26C9F20852562006448EF /* IssueHandler.swift in Sources */, diff --git a/Eglaf/Controllers/Report/CategoryCollectionViewCell.swift b/Eglaf/Controllers/Report/CategoryCollectionViewCell.swift new file mode 100644 index 0000000..4d8ccfb --- /dev/null +++ b/Eglaf/Controllers/Report/CategoryCollectionViewCell.swift @@ -0,0 +1,41 @@ +// +// CategoryCollectionViewCell.swift +// Eglaf +// +// Created by Adam Zvada on 26.04.18. +// Copyright © 2018 Adam Zvada. All rights reserved. +// + +import UIKit + +class CategoryCollectionViewCell: UICollectionViewCell { + + @IBOutlet weak var bgView: UIView! + @IBOutlet weak var categoryNameLabel: UILabel! + var categoryType: IssueCategory = .catering { + didSet { + self.categoryNameLabel.text = categoryType.rawValue + self.bgView.layer.borderColor = categoryType.categoryColor.cgColor + self.categoryNameLabel.textColor = isSelected ? .white : categoryType.categoryColor + self.bgView.backgroundColor = isSelected ? categoryType.categoryColor : .clear + } + } + + override var isSelected: Bool { + didSet { + if oldValue != isSelected { + self.categoryNameLabel.textColor = isSelected ? .white : categoryType.categoryColor + self.bgView.backgroundColor = isSelected ? categoryType.categoryColor : .clear + } + } + } + + override func awakeFromNib() { + super.awakeFromNib() + self.bgView.layer.borderWidth = 1 + //self.bgView.layer.borderColor = categoryType.categoryColor.cgColor + self.bgView.layer.cornerRadius = 4 + } + +} + diff --git a/Eglaf/Controllers/Report/CategoryCollectionViewCell.xib b/Eglaf/Controllers/Report/CategoryCollectionViewCell.xib new file mode 100644 index 0000000..f83c8c9 --- /dev/null +++ b/Eglaf/Controllers/Report/CategoryCollectionViewCell.xib @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> + <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <customFonts key="customFonts"> + <array key="SF-Pro-Display-Regular.otf"> + <string>SFProDisplay-Regular</string> + </array> + </customFonts> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CategoryCollectionViewCell" id="R6T-Q3-OmK" customClass="CategoryCollectionViewCell" customModule="Eglaf" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="99" height="46"/> + <autoresizingMask key="autoresizingMask"/> + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> + <rect key="frame" x="0.0" y="0.0" width="99" height="46"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kg7-kd-tCB"> + <rect key="frame" x="0.0" y="0.0" width="99" height="46"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="#CATERING" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ugD-91-bPh"> + <rect key="frame" x="0.0" y="0.0" width="99" height="46"/> + <fontDescription key="fontDescription" name="SFProDisplay-Regular" family="SF Pro Display" pointSize="10"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <constraints> + <constraint firstItem="ugD-91-bPh" firstAttribute="top" secondItem="kg7-kd-tCB" secondAttribute="top" id="470-xn-U4P"/> + <constraint firstAttribute="bottom" secondItem="ugD-91-bPh" secondAttribute="bottom" id="HGO-qF-ndc"/> + <constraint firstAttribute="trailing" secondItem="ugD-91-bPh" secondAttribute="trailing" id="N0a-va-fwo"/> + <constraint firstItem="ugD-91-bPh" firstAttribute="leading" secondItem="kg7-kd-tCB" secondAttribute="leading" id="XsZ-o2-2Ri"/> + </constraints> + </view> + </subviews> + </view> + <constraints> + <constraint firstAttribute="bottom" secondItem="kg7-kd-tCB" secondAttribute="bottom" id="1eg-yx-xVZ"/> + <constraint firstAttribute="trailing" secondItem="kg7-kd-tCB" secondAttribute="trailing" id="DJV-A5-RT5"/> + <constraint firstItem="kg7-kd-tCB" firstAttribute="top" secondItem="R6T-Q3-OmK" secondAttribute="top" id="edA-XW-rLE"/> + <constraint firstItem="kg7-kd-tCB" firstAttribute="leading" secondItem="R6T-Q3-OmK" secondAttribute="leading" id="mgg-WQ-Ccs"/> + </constraints> + <viewLayoutGuide key="safeArea" id="6o6-KI-I9d"/> + <connections> + <outlet property="bgView" destination="kg7-kd-tCB" id="I1T-9T-m3p"/> + <outlet property="categoryNameLabel" destination="ugD-91-bPh" id="8UU-F4-3kY"/> + </connections> + <point key="canvasLocation" x="24.5" y="52"/> + </collectionViewCell> + </objects> +</document> diff --git a/Eglaf/Controllers/Report/ReportViewController.swift b/Eglaf/Controllers/Report/ReportViewController.swift index df05bef..b728d53 100644 --- a/Eglaf/Controllers/Report/ReportViewController.swift +++ b/Eglaf/Controllers/Report/ReportViewController.swift @@ -8,30 +8,158 @@ import UIKit -class ReportViewController: UIViewController, StoryboardInit { +enum IssueCategory: String { + case catering = "#CATERING" + case scanning = "#SCANNING" + case infoPoint = "#INFO POINT" + case security = "#SECURITY" + case registration = "#REGISTRATION" + case other = "#OTHER" + + var categoryColor: UIColor { + switch self { + case .catering: + return UIColor(red:0.27, green:0.71, blue:0.77, alpha:1) + case .scanning: + return UIColor(red:1, green:0.95, blue:0.33, alpha:1) + case .infoPoint: + return UIColor(red:0.73, green:0.53, blue:0.99, alpha:1) + case .security: + return UIColor(red:1, green:0.62, blue:0.35, alpha:1) + case .registration: + return UIColor(red:0.45, green:1, blue:0.6, alpha:1) + case .other: + return UIColor(red:0.45, green:1, blue:0.6, alpha:1) + } + } +} + +import Foundation +import UIKit + +protocol ReportViewControllerDelegate { + func viewDismissed() +} + +class ReportViewController: UIViewController, StoryboardInit { + + var userHandler: UserHandler = UserHandler.sharedInstance + var issueHandler: IssueHandler = IssueHandler.sharedInstance + var delegate: ReportViewControllerDelegate? + + @IBOutlet weak var collectionView: UICollectionView! + @IBOutlet weak var prioritySegment: UISegmentedControl! + @IBOutlet weak var descriptionField: UITextView! + + var issueCategories: [IssueCategory] = [.scanning, .catering, .security, .registration, .infoPoint, .other] + override func viewDidLoad() { - super.viewDidLoad() + registerNibs() + + prepareNavBar() - self.view.backgroundColor = .black + collectionView.dataSource = self + collectionView.delegate = self + collectionView.allowsSelection = true + collectionView.allowsMultipleSelection = false - // Do any additional setup after loading the view. + + descriptionField.becomeFirstResponder() + + let normalTextAttributes: [AnyHashable : Any] = [ + NSAttributedStringKey.foregroundColor as NSObject: UIColor(red:0.35, green:0.43, blue:0.52, alpha:1), + NSAttributedStringKey.font: UIFont(name: "SFProDisplay-Regular", size: 10)! + ] + + let boldTextAttributes: [AnyHashable : Any] = [ + NSAttributedStringKey.foregroundColor : UIColor.white, + NSAttributedStringKey.font : UIFont(name: "SFProDisplay-Regular", size: 10)!, + ] + + prioritySegment.setTitleTextAttributes(normalTextAttributes, for: .normal) + prioritySegment.setTitleTextAttributes(boldTextAttributes, for: .selected) } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. + func prepareNavBar() { + //self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) + self.navigationController?.navigationBar.isTranslucent = false + self.navigationController?.navigationBar.barTintColor = UIColor(red: 0, green: 0.1, blue: 0.22, alpha: 1) + //self.navigationController?.view.backgroundColor = UIColor.red + self.navigationItem.title = "ADD NEW REPORT" + self.navigationController?.navigationBar.titleTextAttributes = [ + NSAttributedStringKey.font: UIFont(name: "SFProDisplay-Regular", size: 14)!, + NSAttributedStringKey.foregroundColor: UIColor.white, + NSAttributedStringKey.kern: 3 + ] + self.navigationItem.leftBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "Close"), style: .plain, target: self, action: #selector(cancel)) + self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "POST", style: .plain, target: self, action: #selector(post)) + self.navigationItem.rightBarButtonItem?.setTitleTextAttributes([ + NSAttributedStringKey.font: UIFont(name: "SFProDisplay-Regular", size: 14)!, + NSAttributedStringKey.foregroundColor: UIColor.white, + NSAttributedStringKey.kern: 2 + ], for: .normal) + self.navigationController?.navigationBar.tintColor = UIColor(red:0.35, green:0.43, blue:0.52, alpha:1) } + @objc func post() { + guard let path = collectionView.indexPathsForSelectedItems else { + self.dismiss(animated: true, completion: nil) + return + } + + guard let index = path.first?.item else { + //showOKAlert(message: "Please select a category") + return + } + var selectedCategory = issueCategories[index].rawValue.lowercased() + selectedCategory.removeFirst() + let isUrgent = prioritySegment.selectedSegmentIndex == 0 ? false : true + let issue = Issue(description: descriptionField.text, category: selectedCategory, urgent: isUrgent, location: "") + + //issueHandler.addIssue(issue: issue) + + self.dismiss(animated: true, completion: { + self.delegate?.viewDismissed() + }) + } + + @objc func cancel() { + self.dismiss(animated: true, completion: nil) + } +} + +extension ReportViewController { + func registerNibs() { + collectionView.register(UINib(nibName: "CategoryCollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "CategoryCollectionViewCell") + } +} - /* - // MARK: - Navigation - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. +extension ReportViewController: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return UIEdgeInsetsMake(0, 17, 0, 17) } - */ + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: 99, height: 46) + } +} +extension ReportViewController: UICollectionViewDelegate { + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + + } +} + +extension ReportViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return issueCategories.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CategoryCollectionViewCell", for: indexPath) as? CategoryCollectionViewCell else { + return UICollectionViewCell() + } + cell.categoryType = issueCategories[indexPath.row] + return cell + } } diff --git a/Eglaf/Storyboards/ReportViewController.storyboard b/Eglaf/Storyboards/ReportViewController.storyboard index a4374a7..eab617a 100644 --- a/Eglaf/Storyboards/ReportViewController.storyboard +++ b/Eglaf/Storyboards/ReportViewController.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="bir-ak-rDi"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="0ye-XN-510"> <device id="retina4_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> @@ -9,21 +9,114 @@ <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> + <customFonts key="customFonts"> + <array key="SF-Pro-Display-Regular.otf"> + <string>SFProDisplay-Regular</string> + </array> + </customFonts> <scenes> <!--ReportViewController--> - <scene sceneID="ngl-md-AHd"> + <scene sceneID="PL1-6t-dC8"> <objects> - <viewController title="ReportViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="bir-ak-rDi" customClass="ReportViewController" customModule="Eglaf" customModuleProvider="target" sceneMemberID="viewController"> - <view key="view" contentMode="scaleToFill" id="B3O-aT-KmS"> + <viewController storyboardIdentifier="ReportViewController" title="ReportViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="0ye-XN-510" customClass="ReportViewController" customModule="Eglaf" customModuleProvider="target" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="pTN-wJ-zA1"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <viewLayoutGuide key="safeArea" id="hzT-OP-A5p"/> + <subviews> + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="EHq-xx-CF1"> + <rect key="frame" x="0.0" y="172" width="375" height="50"/> + <color key="backgroundColor" red="0.0" green="0.1019607843" blue="0.2156862745" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <constraints> + <constraint firstAttribute="height" constant="50" id="ZfK-II-Jdy"/> + </constraints> + <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="7qb-lm-lbO"> + <size key="itemSize" width="99" height="46"/> + <size key="headerReferenceSize" width="0.0" height="0.0"/> + <size key="footerReferenceSize" width="0.0" height="0.0"/> + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> + </collectionViewFlowLayout> + <cells> + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="W8t-MZ-fyG"> + <rect key="frame" x="0.0" y="2" width="99" height="46"/> + <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="99" height="46"/> + <autoresizingMask key="autoresizingMask"/> + </view> + </collectionViewCell> + </cells> + </collectionView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Priority" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aEe-yI-wVH"> + <rect key="frame" x="15" y="242" width="38" height="16"/> + <fontDescription key="fontDescription" name="SFProDisplay-Regular" family="SF Pro Display" pointSize="13"/> + <color key="textColor" red="0.34509803919999998" green="0.42745098040000001" blue="0.52156862749999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Category" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sVL-MK-ret"> + <rect key="frame" x="15" y="141" width="50.5" height="16"/> + <fontDescription key="fontDescription" name="SFProDisplay-Regular" family="SF Pro Display" pointSize="13"/> + <color key="textColor" red="0.34509803919999998" green="0.42745098040000001" blue="0.52156862749999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <nil key="highlightedColor"/> + </label> + <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O6W-SU-9fm"> + <rect key="frame" x="11" y="46" width="349" height="80"/> + <color key="backgroundColor" red="0.0" green="0.1019607843" blue="0.2156862745" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <constraints> + <constraint firstAttribute="height" constant="80" id="ywq-3J-pZV"/> + </constraints> + <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <fontDescription key="fontDescription" name="SFProDisplay-Regular" family="SF Pro Display" pointSize="16"/> + <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> + </textView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Report" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xmM-Q8-8Ed"> + <rect key="frame" x="15" y="20" width="36.5" height="16"/> + <fontDescription key="fontDescription" name="SFProDisplay-Regular" family="SF Pro Display" pointSize="13"/> + <color key="textColor" red="0.34509803919999998" green="0.42745098040000001" blue="0.52156862749999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <nil key="highlightedColor"/> + </label> + <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="INN-4L-kXT"> + <rect key="frame" x="15" y="266" width="345" height="47"/> + <constraints> + <constraint firstAttribute="height" constant="46" id="AC5-KN-KQB"/> + </constraints> + <segments> + <segment title="NORMAL"/> + <segment title="URGENT"/> + </segments> + <color key="tintColor" red="0.34509803919999998" green="0.42745098040000001" blue="0.52156862749999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + </segmentedControl> + </subviews> + <color key="backgroundColor" red="0.0" green="0.1019607843" blue="0.2156862745" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <constraints> + <constraint firstItem="EHq-xx-CF1" firstAttribute="trailing" secondItem="j6I-XL-6GX" secondAttribute="trailing" id="3qB-QX-03i"/> + <constraint firstItem="sVL-MK-ret" firstAttribute="leading" secondItem="j6I-XL-6GX" secondAttribute="leading" constant="15" id="7cD-QQ-ZpZ"/> + <constraint firstItem="j6I-XL-6GX" firstAttribute="trailing" secondItem="INN-4L-kXT" secondAttribute="trailing" constant="15" id="BVV-rJ-V3m"/> + <constraint firstItem="aEe-yI-wVH" firstAttribute="leading" secondItem="j6I-XL-6GX" secondAttribute="leading" constant="15" id="Cz8-VT-xjd"/> + <constraint firstItem="EHq-xx-CF1" firstAttribute="leading" secondItem="j6I-XL-6GX" secondAttribute="leading" id="FwH-R0-09U"/> + <constraint firstItem="INN-4L-kXT" firstAttribute="leading" secondItem="j6I-XL-6GX" secondAttribute="leading" constant="15" id="Hwu-04-AlR"/> + <constraint firstItem="sVL-MK-ret" firstAttribute="top" secondItem="O6W-SU-9fm" secondAttribute="bottom" constant="15" id="Npc-Vk-qRv"/> + <constraint firstItem="O6W-SU-9fm" firstAttribute="leading" secondItem="j6I-XL-6GX" secondAttribute="leading" constant="11" id="dMt-aR-o4a"/> + <constraint firstItem="EHq-xx-CF1" firstAttribute="top" secondItem="sVL-MK-ret" secondAttribute="bottom" constant="15" id="gQn-ig-4xs"/> + <constraint firstItem="j6I-XL-6GX" firstAttribute="trailing" secondItem="O6W-SU-9fm" secondAttribute="trailing" constant="15" id="gzj-i2-39p"/> + <constraint firstItem="xmM-Q8-8Ed" firstAttribute="leading" secondItem="pTN-wJ-zA1" secondAttribute="leading" constant="15" id="nfB-9K-UMx"/> + <constraint firstItem="O6W-SU-9fm" firstAttribute="top" secondItem="xmM-Q8-8Ed" secondAttribute="bottom" constant="10" id="rHY-fF-Ghk"/> + <constraint firstItem="aEe-yI-wVH" firstAttribute="top" secondItem="EHq-xx-CF1" secondAttribute="bottom" constant="20" id="shu-4S-ai8"/> + <constraint firstItem="xmM-Q8-8Ed" firstAttribute="top" secondItem="pTN-wJ-zA1" secondAttribute="top" constant="20" id="yV6-Vi-wRc"/> + <constraint firstItem="INN-4L-kXT" firstAttribute="top" secondItem="aEe-yI-wVH" secondAttribute="bottom" constant="8" id="yof-2R-4KV"/> + </constraints> + <viewLayoutGuide key="safeArea" id="j6I-XL-6GX"/> </view> + <navigationItem key="navigationItem" id="CHC-na-fJH"/> + <connections> + <outlet property="collectionView" destination="EHq-xx-CF1" id="jjS-dg-7xJ"/> + <outlet property="descriptionField" destination="O6W-SU-9fm" id="tBm-Pz-cgg"/> + <outlet property="prioritySegment" destination="INN-4L-kXT" id="M1a-Ip-ykU"/> + </connections> </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="HgH-am-dhQ" userLabel="First Responder" sceneMemberID="firstResponder"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="2Ul-FF-X82" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> - <point key="canvasLocation" x="105" y="167"/> + <point key="canvasLocation" x="-247" y="144"/> </scene> </scenes> </document> -- GitLab