我是 iOS 开发的新手.
I'm fairly new to iOS development.
我想在 UITableViewController 的表格视图中添加页脚.我已经在 Storyboard 中以图形方式制作了要用作页脚的视图,但是我不知道如何将其作为页脚连接到我的表格视图.
I want to add a footer to the table view in a UITableViewController. I've made the view I want to use as the footer graphically in Storyboard, however I can't work out how to hook it up as the footer to my table view.
我可以通过分配 self.tableView.tableFooterView 以编程方式在 UITableViewController 的 viewDidLoad 方法中添加页脚.但是我在 Storyboard 中创建了页脚视图,将其作为页脚添加到表格视图的最佳实践方法是什么?
I can add a footer programmatically in UITableViewController's viewDidLoad method by assigning self.tableView.tableFooterView. But I've created my footer view in Storyboard, what is the best practice way of adding it as the footer to my table view?
你可以只拖一个视图到tableView的底部区域.您将在层次结构中看到它将是 tableview 的子视图.然后您可以将子视图(例如标签和按钮)拖到那里,调整高度等.
You can just drag a view to the bottom area of the tableView. You'll see in the hierarchy that it will be a subview of the tableview. You can then drag subviews such as labels and buttons there, adjust the height, etc.
这篇关于如何在 Storyboard 中向 UITableView 添加页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在没有应用程序源代码的情况下使用 Instruments 测Using Instruments to test an iOS app without having source code to the application(在没有应用程序源代码的情况下使用 Instruments 测试
KIF:如何自动运行/压力测试 iOS 应用程序以找出罕KIF: How to auto-run/stress test an iOS app to find the cause of a rare UI bug?(KIF:如何自动运行/压力测试 iOS 应用程序以找出罕见 UI 错
无法更改 Xcode 4.5 中的目标成员身份可见性Can#39;t change target membership visibility in Xcode 4.5(无法更改 Xcode 4.5 中的目标成员身份可见性)
UITableView:在混合单元格表视图静态和动态单元格UITableView: Handle cell selection in a mixed cell table view static and dynamic cells(UITableView:在混合单元格表视图静态和动态单元格中
如何在 iOS 中删除 Safari 中的地址栏?How to remove Address Bar in Safari in iOS?(如何在 iOS 中删除 Safari 中的地址栏?)
升级到 Xcode 4.5 后,iOS 5 SDK 消失了iOS 5 SDK is gone after upgrade to Xcode 4.5(升级到 Xcode 4.5 后,iOS 5 SDK 消失了)