iOS UINavigationBar vs UIToolbar vs UITabBar [英] iOS UINavigationBar vs UIToolbar vs UITabBar

查看:86
本文介绍了iOS UINavigationBar vs UIToolbar vs UITabBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我知道在哪种情况下应该使用哪一种。

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

它们之间有什么区别?

每个组件的优点和缺点是什么?

What are the advantage and disadvantage of each component?

推荐答案

UINavigationBar 类实现了一个控件导航分层内容。它是一个条形图,通常显示在屏幕顶部,包含用于在层次结构中上下导航的按钮。主要属性是左(后)按钮,中心标题和可选的右按钮。

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.

UIToolbar 类的实例是用于选择多个按钮之一的控件,称为工具栏项。点击时,工具栏会暂时突出显示或不会更改项目的外观。如果需要单选按钮样式控件,请使用UITabBar类。

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.

UITabBar 类实现了一个控件,用于选择两个或多个按钮之一,称为项目。标签栏最常见的用途是实现模态界面,其中点击项目会更改选择。

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.

这篇关于iOS UINavigationBar vs UIToolbar vs UITabBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆