Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当操作表的按钮数超过 7 个时,标题从视图中消失?如何在当前视图中显示它?
坦率地说,如果您在操作表中显示超过 7 个按钮,则需要重新考虑该表的布局。您需要向用户提供一组更有限的选择。一次在屏幕上显示 7 个选项会导致用户面对太多选择而瘫痪。
在这种情况下,您应该创建一个UITableViewController显示所有选项的子类,而不是使用 UIActionSheet。您可以将标题文本放入部分标题或tableHeaderView.
UITableViewController
tableHeaderView