Commit 821b7fa4 authored by Zach Knox's avatar Zach Knox
Browse files

The UI Looks good on tiny phones

Also who needs notification buttons anyway...
parent 76edbb08
......@@ -19,16 +19,6 @@ class LocationDetailViewController: UIViewController, UITableViewDelegate, UITab
@IBOutlet var detailStackView: UIStackView!
@IBOutlet var OrderButton: UIButton!
@IBAction func orderButton(_ sender: Any) {
}
@IBOutlet var NotifyButton: UIButton!
@IBAction func notifyButton(_ sender: Any) {
}
var facility: Facility!
override func viewWillAppear(_ animated: Bool) {
......@@ -38,12 +28,6 @@ class LocationDetailViewController: UIViewController, UITableViewDelegate, UITab
}
override func viewDidLoad() {
super.viewDidLoad()
/*
OrderButton.layer.cornerRadius = 10
NotifyButton.layer.cornerRadius = 10
OrderButton.layer.borderWidth = 5
NotifyButton.layer.borderWidth = 5
*/
NameLabel.text = facility.name
PlaceLabel.text = facility.location
......
......@@ -44,6 +44,12 @@ class LocationsListViewController: UIViewController, UICollectionViewDelegate, U
override func viewDidLoad() {
super.viewDidLoad()
//This code makes it look good on an iPhone SE
let windowWidth = self.view.frame.size.width
if(windowWidth <= 320) {
LocationsListLayout.itemSize.width = 300
}
LocationsListLayout.sectionInset = UIEdgeInsetsMake(10, 10, 10, 10)
refreshControl.addTarget(self, action: #selector(refresh), for: .valueChanged)
......@@ -89,6 +95,13 @@ class LocationsListViewController: UIViewController, UICollectionViewDelegate, U
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CollectionCell", for: indexPath) as! SRCTSimpleCollectionViewCell
/*
let windowRect = self.view.window!.frame
let windowWidth = windowRect.size.width
if(windowWidth <= 320) {
cell.frame.size.width = 280
}
*/
let dataArray = placeOpenFacilitiesFirstInArray(facilitiesArray)
let facility = dataArray[indexPath.row]
......
......@@ -17,7 +17,7 @@ class SRCTSimpleCollectionViewCell: UICollectionViewCell {
override func awakeFromNib() {
super.awakeFromNib()
self.layer.cornerRadius = 10
self.layer.cornerRadius = 8
// Initialization code
}
}
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