简体   繁体   English

在屏幕底部放置一个视图

[英]Put a View in bottom of Screen

I try to put a View to the bottom of the screen on my UiTableView. 我尝试将View放在UiTableView的屏幕底部。 How can I do that? 我怎样才能做到这一点? Now it is still the last row. 现在仍然是最后一行。 I searched for it but I didnt found someting useful. 我搜索了它,但没有发现有用的东西。 I hope you guys can help me 我希望你们能帮助我

Please put UIView below the UITableViewCell like this. 请像这样将UIView放在UITableViewCell下面。 在此处输入图片说明

Drag the desired view to the bottom of the UITableView 's contents, ie below all of the table's cells. 将所需的视图UITableView内容的底部 ,即表的所有单元格的下方

在此处输入图片说明

You can add this line inside your code for your table view cell bottom 您可以在代码中为表格视图单元格底部添加此行

override func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
        let footerView = UIView(frame: CGRectMake(0, 0, tableView.frame.size.width, 60))
        footerView.backgroundColor = UIColor.whiteColor()
        return footerView
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM