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.
当我们点击分段控件的段时,是否允许切换到不同的屏幕(如popViewController / pushViewController)?还是我们必须留在同一个屏幕上并改变视图?
这取决于您的要求。但使用分段控件推送视图并不是一个好习惯。分段应该像开关一样工作。例如,根据段选择显示数据的 tableView。
绝对不是不允许的,但如果您正在寻找像行为导航控制器这样的页面控件,则可能不是最好的方法。但是,这完全取决于您的用例。