SWIFT 3:
self.present(controller, animated: true, completion: nil)
self.present(controller, animated: true, completion: nil)
2017-08-05
stackflow上找的,末尾老師用的close()函數改為
@IBAction func unwindToViewControllerNameHere(segue: UIStoryboardSegue) {
//nothing goes here
}
Xcode 8.2.1 親測可用
@IBAction func unwindToViewControllerNameHere(segue: UIStoryboardSegue) {
//nothing goes here
}
Xcode 8.2.1 親測可用
2017-07-25
我按照这节课的敲处理return Editing 报错 改成return isEditing 但是运行之后点击Edit 不能滑动改变位置 没有出现右边的那个电话拖动的按钮
2017-07-24
哈哈,昨天自己瞎琢磨半天,没弄明白默认的俩tab怎么加第三个,今天几分钟看了就学会了。谢谢老师!
2017-07-13
if editingStyle == UITableViewCellEditingStyle.delete {
todos.remove(at: indexPath.row)
self.tableView.deleteRows(at: [indexPath], with: UITableViewRowAnimation.automatic)
// self.tableView.reloadData()
}
todos.remove(at: indexPath.row)
self.tableView.deleteRows(at: [indexPath], with: UITableViewRowAnimation.automatic)
// self.tableView.reloadData()
}
2017-05-25
let locale = NSLocale.current
let dateFormat = DateFormatter.dateFormat(fromTemplate: "yyyy-MM-dd", options: 0, locale: locale)
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = dateFormat
date.text = dateFormatter.string(from: todo.date as Date)
let dateFormat = DateFormatter.dateFormat(fromTemplate: "yyyy-MM-dd", options: 0, locale: locale)
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = dateFormat
date.text = dateFormatter.string(from: todo.date as Date)
2017-05-25