[英]Button over tableviewcontroller stretching (Swift)?
我在表格視圖(UITableViewController)頁腳的視圖中有一個按鈕。 當我嘗試將以下代碼應用於按鈕時,為什么按鈕會拉伸?
我應用代碼:
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
// Make footerview so it fill up size of the screen
// The button is aligned to bottom of the footerview
// using autolayout constraints
self.tableView.tableFooterView = nil
self.footerView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.tableView.frame.size.height - self.tableView.contentSize.height - self.footerView.frame.size.height)
self.tableView.tableFooterView = self.footerView
}
我一直在關注這個問題的答案:
在UITableViewController頂部添加按鈕(Swift)
謝謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.