swift uitableview显示cell最后一列
发布时间:2020-12-14 02:12:17 所属栏目:百科 来源:网络整理
导读:类似qq聊天的效果。每发一条信息,tableview更新cell并且显示最后一个cell func tableView(tableView: UITableView,cellForRowAtIndexPath indexPath: NSIndexPath) - UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("cell") as
类似qq聊天的效果。每发一条信息,tableview更新cell并且显示最后一个cell
func tableView(tableView: UITableView,cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("cell") as! UITableViewCell var sectionCount:Int = self.tableViewMessInfo.numberOfSections() if(sectionCount != 0) { var rowCount = self.tableViewMessInfo.numberOfRowsInSection(0) if(rowCount != 0) { println("\\\\") var ii = [0,rowCount - 1] var indexPath = NSIndexPath(indexes: ii,length: ii.count) self.tableViewMessInfo.scrollToRowAtIndexPath(indexPath,atScrollPosition: UITableViewScrollPosition.Bottom,animated: true) } } return cell } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- c# – 以下代码中的含义是什么:List employees = new List
- swift – 如何使struct和typealias符合@objc
- OpenScales 2.0 使用ogc filter查询过滤WFS数据
- ora 01795 in 1000 limit
- Swift 无操作时自动登出
- Visual C++ 常用数据类型转换方法详解第1/2页
- c# – 返回字符串列表
- (4.1.37.5)自定义控件的xml属性:declare-styleable
- ruby-on-rails – 即使通过HTTP,也可以在RoR中的会话cookie
- reactjs – 用三元运算符React className添加类’null’