亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

使用Swift開發iOS8 App實戰

林永堅 其它
難度高級
時長 7小時49分
學習人數
綜合評分9.73
44人評價 查看評價
10.0 內容實用
9.9 簡潔易懂
9.3 邏輯清晰
if editingStyle == UITableViewCellEditingStyle.delete {
todos.remove(at: indexPath.row)
self.tableView.deleteRows(at: [indexPath], with: UITableViewRowAnimation.automatic)
// self.tableView.reloadData()
}
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)
第一個2014這居然是個馬,我以為是牛呢
慕課的ios 老師水平 和安卓比差老遠了 而且編程習慣差 就喜歡復制 拷貝 誤人子弟啊
let locale=NSLocale.current
let dateFormat=DateFormatter.dateFormat(fromTemplate: "yyyy-MM-dd", options: 0, locale: locale)
let dateFormater=DateFormatter()
dateFormater.dateFormat=dateFormat
date.text=dateFormater.string(from: todo.date as Date)
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{
let cell=self.tableview.dequeueReusableCell(withIdentifier: "todocell")
let todo=Todos[indexPath.row] as TodoModel
class TodoViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
Todos=[TodoModel(id:"1",image:"aaa.png",title:"去游樂場",date:dateFromString(dateStr:"2014-11-02")!)]
}
}
import UIKit
var Todos:[TodoModel]=[]
func dateFromString(dateStr:String)->NSDate?{
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd"
let date = dateFormatter.date(from: dateStr)
return date as NSDate?
}
哈哈哈 哈哈哈
我 adding missing constraints 是灰的 點不了,我點的 reset to suggested constraints ~
右鍵也可以綁定
最新的、已測試正確~

let gregorian = Calendar(identifier:Calendar.Identifier.gregorian)
let now = Date()
let components = gregorian.dateComponents([.year], from: now, to: now)
let age = components.year
課程須知
適合于想了解iOS開發的初學者
老師告訴你能學到什么?
iOS基礎,常用UIKit控件的使用,Storyboards和Segues,Navigation Controller,Auto Layout基礎,Container View Controllers,Tab Bar Controller......

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消