[英]Swift static table view disappears when connected to table view controller
我在我的主故事板中创建了一个简单的静态表视图,但每次我连接一个空白的UITableViewController时,静态视图都没有加载。
从UITableViewController子类中删除numberOfSectionsInTableView()
和tableView(numberOfRowsInSection:)
的默认实现。
即删除那些方法,因为它们返回0:
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 0
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 0
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.