Q: Can't use UITableViewDataSource with custom cell Can't import UITableViewDataSource if i use a custom cell BaseCell. Only works with UITableViewCell although BaseCell is from type UITableViewCell
import UIKit

class XptoViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {

@IBOutlet weak var table: UITableView!

override func viewDidLoad() {
    super.viewDidLoad()

    // Do any additional setup after loading the view.
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}
func tableView(_ tableView:UITableView, numberOfRowsInSection section:Int) -> Int {
    return 10
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> BaseCell {
    let cell = BaseCell()
    return cell
}

}

A: Try the opposite:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = BaseCell()
    return cell
}

But you probably want to use something like:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCellWithIdentifier("BaseCell") as? BaseCell
    return cell!
}

Make sure you set "BaseCell" as your cell identifier, as following:

If you get a runtime error like "Found nil while unwrapping optional", you need to see BaseCell as the class for your cell, see picture:

