import UIKit
class MenuViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
var menuItems = [AnyObject]()
var menuImages = [AnyObject]()
let cellReuseIdentifier = "MenuVC"
@IBOutlet var menu_TableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
menu_TableView.delegate = self
menu_TableView.dataSource = self
menu_TableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
menu_TableView.backgroundColor = UIColor(red: (9.0 / 255.0), green: (77.0 / 255.0), blue: (102.0 / 255.0), alpha: 1)
menuItems = ["Speed", "Distance", "Location", "Time", "Violation Alerts", "Links"]
// self.navigationItem.rightBarButtonItem! = self.editButtonItem()
}
func tableView(tableView:UITableView, numberOfRowsInSection section:Int) -> Int
{
return menuItems.count
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let identifier = menuItems[indexPath.row]
let cell = tableView.dequeueReusableCellWithIdentifier(identifier as! String, forIndexPath: indexPath)
cell.backgroundColor = UIColor(red: (9.0 / 255.0), green: (77.0 / 255.0), blue: (102.0 / 255.0), alpha: 1)
return cell
}
}
Sign up here with your email
ConversionConversion EmoticonEmoticon