我有一个添加按钮,可以带您进入带有文本输入的新视图来添加信息.一旦你点击添加按钮,它会带你回到tableview并将所有输入添加到标签.我无法将当前时间拉入我所做的dateStamp标签.有人可以帮忙吗?
主控制器
var dateStamp = Date()
var clientName = [""]
var projecDescript = [""]
// Custom cell to make all input fields custom
class CustomCell: UITableViewCell {
//Make your outlets here, connect the outlets from cell in your storyboard
@IBOutlet var clientNameLabel: UILabel!
@IBOutlet var descriptionLabel: UILabel!
@IBOutlet var dateStamp: UILabel!
}
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet var clientTableList: UITableView!
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return (clientName.count)
return (projecDescript.count)
}
// This is …Run Code Online (Sandbox Code Playgroud)