今日工作小结
1)用xib自定義cell寫tableviewDemo代碼,轉(zhuǎn)模型,cell重用
見本地develop-demo-FriendTableViewDemo
?
2)textview的內(nèi)容不定格顯示,這好似用導(dǎo)航跳轉(zhuǎn)過去,他會減去64像素,也就是導(dǎo)航的高度都是ScrollView引起的,加上self.automaticallyAdjustsScrollViewInsets = false 就可以解決這一問題
?
3)創(chuàng)建群成功后,那個系統(tǒng)提示語,不用分成兩行,寫到一行就可以加個逗號
?
4)下拉刷新通訊錄時,同一拼音下的用戶順序會發(fā)生變化,沒排序吧
func eachLetterSort(){
? ? ? ? for key in self.keys!{
? ? ? ? ? ? var session = self.dict?.objectForKey(key) as! NSArray
? ? ? ? ? ? session = session.sortedArrayUsingComparator({ (s1, s2) -> NSComparisonResult in
? ? ? ? ? ? ? ? let tempModel1 = s1 as! BCArrowIMPerson
? ? ? ? ? ? ? ? let tempModel2 = s2 as! BCArrowIMPerson
? ? ? ? ? ? ? ? let str1 = tempModel1.namePin as! String
? ? ? ? ? ? ? ? let str2 = tempModel2.namePin as! String
? ? ? ? ? ? ? ? if str1 < str2{
? ? ? ? ? ? ? ? ? ? return NSComparisonResult.OrderedAscending
? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? ? return NSComparisonResult.OrderedDescending
? ? ? ? ? ? ? ? }
? ? ? ? ? ? })
? ? ? ? ? ? self.dict?.setObject(session, forKey: key as! String)
? ? ? ? }
? ? }
特別注意排序后要把字典內(nèi)容覆蓋即這一句self.dict?.setObject(session, forKey: key?as!?String)
5)鏈接斷開的時候沒有提醒
通過代理修改self.title,注意與self.navigationItem.title的區(qū)別
轉(zhuǎn)載于:https://www.cnblogs.com/torrescx/p/5387983.html
總結(jié)
- 上一篇: 多线程图解
- 下一篇: 选取文档元素的API