Large diffs are not rendered by default.

@@ -36,6 +36,7 @@ class Event {

init(name: String, location: CLLocation, locationName: String, repeatData: [WeekDay : [NSDate]], endDate: NSDate?) {
self.name = name
self.locationString = locationName
self.location = location
self.dayRepeat = repeatData
self.endDate = endDate
@@ -8,7 +8,66 @@
import Foundation
import UIKit
import Charts

class RepeatCell : UITableViewCell {
@IBOutlet weak var dayLabel: UILabel!
@IBOutlet weak var timeLabel: UILabel!
}


class EventViewController: UIViewController {
var event : Event!

@IBOutlet weak var barChart: BarStatView!
@IBOutlet weak var locationLabel: UILabel!
@IBOutlet weak var repeatTable: UITableView!
@IBOutlet weak var multiplierLabel: UILabel!
@IBOutlet weak var streakLabel: UILabel!
@IBOutlet weak var donatedLabel: UILabel!

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
locationLabel.text = "\(event.locationString)"
donatedLabel.text = "$\(event.moneyDonated)"
streakLabel.text = "\(event.streak)"

self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.blackColor(), NSFontAttributeName: UIFont(name: "avenir", size: 21)!]

//TableViewCustomization
repeatTable.tableFooterView = UIView()
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

//MARK: Actions
}

//MARK: TableViewDelegate methods
extension EventViewController : UITableViewDelegate, UITableViewDataSource {
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
return 5
}


func tableView(tableView: UITableView,
cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
//let index = indexPath.row
//let data = events[index]
let cell = self.repeatTable.dequeueReusableCellWithIdentifier("repeatCell") as! RepeatCell

cell.timeLabel.text = "9:00 PM"
cell.dayLabel.text = "MON"
return cell
}

func tableView(tableView: UITableView, heightForRowAtIndexPath: NSIndexPath) -> CGFloat {
return 100
}
}
@@ -10,6 +10,9 @@ import UIKit

class EventCell : UITableViewCell {

@IBOutlet weak var timeLabel: UILabel!
@IBOutlet weak var locationLabel: UILabel!
@IBOutlet weak var titleLabel: UILabel!
}

class HomeViewController: UIViewController {
@@ -30,6 +33,9 @@ class HomeViewController: UIViewController {
pointsLabel.text = "\(user.points)"

self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.redColor(), NSFontAttributeName: UIFont(name: "avenir", size: 21)!]

//TableViewCustomization
dayEventTable.tableFooterView = UIView()
}

override func didReceiveMemoryWarning() {
@@ -58,10 +64,10 @@ extension HomeViewController : UITableViewDelegate, UITableViewDataSource {
let event = events[index]
let cell = self.dayEventTable.dequeueReusableCellWithIdentifier("eventCell") as! EventCell
//let proj = projectList[indexPath.row]
//cell.titleLabel.text = proj.title
//cell.locationEnabled = self.locationEnabled
cell.textLabel!.text = event.name
cell.detailTextLabel!.text = event.locationString
cell.titleLabel.text = event.name
cell.locationLabel.text = event.locationString
cell.timeLabel.text = "11:35 AM" //TODO: Complete this correctly
return cell
}