Learning iOS D4 2017-10-25

Git

如果不小心commit了一個(gè)不需要commit的文件,可以對其進(jìn)行撤銷。

先使用git log 查看 commit日志

git reset --hard commit_id

任務(wù)

使用tableview完成頁面

創(chuàng)建一個(gè)View 里面放cell.xib&swift class 定義cell里需要使用的UI


tip:

全局?使用可選類型定義 在其他情況可以調(diào)用得到

需要初始化init()

let cell = ValuationServicesTableViewCell(style: .default, reuseIdentifier: String(describing: ValuationServicesTableViewCell.self))

對各個(gè)UI進(jìn)行配置

對顏色的定義(歸類在config)

對各個(gè)UI位置進(jìn)行設(shè)置(使用snapkit)

創(chuàng)建controller.xib&swift 在 保價(jià)服務(wù) 下


1.class里引入

UITableViewDelegate, UITableViewDataSource

因?yàn)橐肓?UITableViewDataSource 所以會默認(rèn)生成兩個(gè)func

在這兩個(gè)func里完成section內(nèi) 行row 數(shù) 和 cell里內(nèi)容的配置

由于使用了自定義cell 所以

let cell = ValuationServicesTableViewCell(style: .default, reuseIdentifier: String(describing: ValuationServicesTableViewCell.self))

在之前對tableview配置時(shí)需要 delegate, register, dataSource

對cell的describing進(jìn)行string轉(zhuǎn)換

String(describing: ValuationServicesTableViewCell.self)

完成頁面



明日目標(biāo)

訂單支付

學(xué)習(xí)swift

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容