I am using swift and XCode 6.3.1. I edited a table view controller in storyboard with static cells. Wanting to program a label and a outlet, I created a new UITableViewController Cocoa Touch File and defined the view controllers class the Cocoa Touch File that I just made. However once I declared the class, nothing I edited in the storyboard appears in the simulator.
import UIKit
class TableViewController: UITableViewController {
@IBOutlet weak var distanceSliderLbl: UILabel!
@IBOutlet weak var distanceSlider: UISlider!
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK: - Table view data source
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
// #warning Potentially incomplete method implementation.
// Return the number of sections.
return 0
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete method implementation.
// Return the number of rows in the section.
return 0
}
@IBAction func distanceSlider_Slide(sender: AnyObject) {
var currentValue = Int(distanceSlider.value)
distanceSliderLbl.text = "\(currentValue)"
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath) as! UITableViewCell
// Configure the cell...
return cell
}
Is there any way to fix this?