我正在开发一个带选项卡栏的 ios 应用程序。我的栏上有超过 5 个按钮,所以在 iphone 上我有更多的按钮。 现在,假设我有这个按钮:Button1 Button2 Button3 Button4 More(以及里面的More)Button5 Button6。 如果我单击更多,然后单击 Button5,我将进入相对于 Button5 的 View 。然后我单击 Button2(不在“更多”中),然后进入相对于 Button2 的 View 。 到目前为止,一切都很好。 现在,如果我单击“更多”,我不会进入“更多”选项卡,而是返回到与 Button5 相关的 View 。 如何使“更多”按钮始终进入“更多” View ?
最佳答案
您不需要添加更多按钮。只需将 View Controller 设置为 UITabBarController
- (void)setViewControllers:(NSArray *)viewControllers animated:(BOOL)animated
如果你有超过 5 个 View Controller ,它会自动创建一个更多按钮!即 NSArray 的计数大于 5。
关于ios - 如何使“更多”按钮始终进入“更多 View ”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15655546/