我在一个 swift 项目上使用工具栏,不知何故它有一个分段控件作为 BarButtonItem,它工作得很好。
我现在需要做的是在 FutureButton 下添加 2 个 UIButton,如果可能的话使用堆栈 View 。这似乎是可能的,因为它与另一个 BarbuttonItem 中的 segcontrol 几乎相同。
我尝试了针对类似问题建议的许多不同解决方案,但我无法添加任何内容,甚至无法添加另一个用于测试目的的 segcontrol,但没有任何运气。
知道如何实现这一目标吗?
编辑:添加应用截图
最佳答案
-> UIToolBar
-> UIBarButton
-> UIView
-> UIStackView(vertical with 15 spacing)
-> 2 UISegmentedControll (you can change as per you need)
关于ios - 如何使用 StoryBoard 将 UIButton 添加为 UIBarButtonItem?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54578541/