iOS UINavigationBar vs UIToolbar vs UITabBar

前端 未结 4 988
梦谈多话
梦谈多话 2021-02-02 11:22

Let me know which one should be used in what case.

What are differences among them?

What are the advantage and disadvantage of each component?

4条回答
  •  一个人的身影
    2021-02-02 11:34

    The UINavigationBar class implements a control for navigating hierarchical content. It’s a bar, typically displayed at the top of the screen, containing buttons for navigating up and down a hierarchy. The primary properties are a left (back) button, a center title, and an optional right button.

    An instance of the UIToolbar class is a control for selecting one of many buttons, called toolbar items. A toolbar momentarily highlights or does not change the appearance of an item when tapped. Use the UITabBar class if you need a radio button style control.

    The UITabBar class implements a control for selecting one of two or more buttons, called items. The most common use of a tab bar is to implement a modal interface where tapping an item changes the selection.

提交回复
热议问题