I need to make a view just like Recents in the Phone application. There are two connected buttons on the top, and when either one is clicked, the view below will change. I tried to use UIToolbar but there are spaces between buttons. Does anyone know how to do this? Thanks in advance.
我需要像Phone应用程序中的Recents一样创建一个视图。顶部有两个连接的按钮,当单击任何一个按钮时,下面的视图将会改变。我试图使用UIToolbar,但按钮之间有空格。有谁知道如何做到这一点?提前致谢。
-Joey
1 个解决方案
#1
I think you want a UISegmentedControl. It allows for connected buttons like the one in the Phone application. Add it to a UIToolbar if you want to mimic the Phone app exactly.
我想你想要一个UISegmentedControl。它允许连接按钮,如电话应用程序中的按钮。如果要完全模仿Phone应用程序,请将其添加到UIToolbar。
The documentation has more info.
文档有更多信息。
#1
I think you want a UISegmentedControl. It allows for connected buttons like the one in the Phone application. Add it to a UIToolbar if you want to mimic the Phone app exactly.
我想你想要一个UISegmentedControl。它允许连接按钮,如电话应用程序中的按钮。如果要完全模仿Phone应用程序,请将其添加到UIToolbar。
The documentation has more info.
文档有更多信息。