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

added init to filters

parent 2ce79f8d
...@@ -15,7 +15,18 @@ struct Filters { ...@@ -15,7 +15,18 @@ struct Filters {
var showClosed = true var showClosed = true
var sortBy = SortMethod.alphabetical var sortBy = SortMethod.alphabetical
var allAllFacilities = true var allAllFacilities = true
var facilitiesToShow: [Facility] var facilitiesShown: [Int: Bool] = [:]
var facilities: [Facility]
init(facilities: [Facility]) {
self.facilities = facilities
var count = 0
for _ in facilities {
facilitiesShown[count] = true
count += 1
}
}
} }
......
...@@ -11,6 +11,7 @@ import UIKit ...@@ -11,6 +11,7 @@ import UIKit
class LocationsListViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource { class LocationsListViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource {
var facilitiesArray = Array<Facility>() var facilitiesArray = Array<Facility>()
var filters = Filters()
@IBOutlet var LeftButton: UIBarButtonItem! @IBOutlet var LeftButton: UIBarButtonItem!
......
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