-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathEventsResultsViewController.swift
38 lines (30 loc) · 1.12 KB
/
EventsResultsViewController.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// SessionsSearchViewController.swift
// FOSSAsia
//
// Created by Jurvis Tan on 7/2/16.
// Copyright © 2016 FossAsia. All rights reserved.
//
import UIKit
class EventsResultsViewController: EventsBaseViewController {
struct StoryboardConstants {
static let storyboardName = "Sessions"
static let viewControllerId = "EventsResultsViewController"
}
lazy var visibleEvents: [EventViewModel] = self.allEvents
override func viewDidLoad() {
super.viewDidLoad()
}
}
// MARK: UITableViewDataSource
extension EventsResultsViewController {
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return visibleEvents.count
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier(kEventCellReuseIdentifier, forIndexPath: indexPath) as! EventCell
let eventViewModel = visibleEvents[indexPath.row]
cell.configure(withPresenter: eventViewModel)
return cell
}
}