简体   繁体   English

tableview和UIButton在同一视图上

[英]tableview and UIButton on the same view

I have a view that contains tableview and button. 我有一个包含tableview和button的视图。 My screen looks like below 我的屏幕如下图所示

-----------------


tableview



-----------------
UIButton
-----------------

However, UIButton doesn't come up. 但是,UIButton不会出现。 I mean, that entire section of the screen is just white and nothing is drawn. 我的意思是,屏幕的整个部分都是白色,什么也没画。

Is tableview preventing that UIButton to showup? tableview是否阻止该UIButton出现?

UITableView most likely overlaying UIButton . UITableView最有可能覆盖UIButton Do you see both table and button in Interface Builder? 您在Interface Builder中看到表格和按钮了吗? If you do, try to make a new project from "View-based application" template, go to the second xib file ( ProjecNameViewController.xib ) in your project ( not to MainWindow.xib , don't touch this file), carefully drag UITableView into the UIView , change size of UITableView for smaller (by default it fill all available space of UIView ), add UIButton under the UITableView . 如果这样做,请尝试从“基于视图的应用程序”模板创建一个新项目,转到项目中的第二个xib文件( ProjecNameViewController.xib )( 而不是MainWindow.xib ,不要触摸此文件),小心地拖动UITableView放入UIView ,将UITableView大小更改为较小(默认情况下,它将填充UIView所有可用空间),在UITableView下添加UIButton Don't do anything else. 别做别的。 Launch project. 启动项目。 If you can see all controls - try to add connections and other stuff. 如果您可以看到所有控件,请尝试添加连接和其他内容。 Maybe you'll catch a step when you do it wrong. 如果做错了,也许会迈出一步。 Good luck! 祝好运!

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

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