1)用xib自定义cell写tableviewDemo代码,转模型,cell重用
见本地develop-demo-FriendTableViewDemo
2)textview的内容不定格显示,这好似用导航跳转过去,他会减去64像素,也就是导航的高度都是ScrollView引起的,加上self.automaticallyAdjustsScrollViewInsets = false 就可以解决这一问题
3)创建群成功后,那个系统提示语,不用分成两行,写到一行就可以加个逗号
4)下拉刷新通讯录时,同一拼音下的用户顺序会发生变化,没排序吧
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)
}
}
特别注意排序后要把字典内容覆盖即这一句self.dict?.setObject(session, forKey: key as! String)
通过代理修改self.title,注意与self.navigationItem.title的区别