


Main content
Brief description
The tab bar application is a multi-view application that displays a row of buttons at the bottom of the screen, called the tab bar. A single button will activate a new view controller (tab) and display a new view, while still retaining the tab bar at the bottom. There are 3 tab bars as shown in the picture below.
Another common multi-view iPhone app is a navigation-based app. This type of app has a navigation controller and uses navigation Columns control a hierarchical series of views. Navigation controllers keep track of the view depth they are in and provide you with control to return to the previous view. The tab bar is used to select one option from two or more options, and only one can be selected (the tab bar is mostly used to select between parallel pages).
Reference: This brief introduction mainly refers to Chapter 6 of "Mastering iOS Development": Multi-View Applications
Storyboard Building Tab Bar
Here we describe how to use Storyboard to build a tab bar multi-view application UI.
1 Select Tab Bar Controller
First select a Tab Bar Controller in the object selection of Storyboard:
In Storyboard we can see the following In the UI interface shown in the figure, we do not need to operate the first page (Tab Bar Controller) because our operations on its tab pages (the next two pages) will automatically update to the Tab Bar Controller.
2 Add our own TableView Controller
As you can see from the picture above, the Tab Bar Controller comes with it when it is dragged into the Storyboard Two tabs, which are of type View Controller, we can remove them and add our own view controllers according to our needs.
First we delete the first built-in View Controller, and then drag in a TableView Controller from the right;
As shown in the picture above, After adding your own TableView Controller, create a jump from the Tab Bar Controller to the TableViewController (hold down Control and drag the line from the Tab Bar Controller to the TableViewController). From the picture above, we can see that in addition to the usual push, modal, and custom methods In addition, there is one more View Controllers, here we should choose this connection;
3 Modify the label style in the label bar
Select the TableViewController we just added The tab icon (Tab Bar Item) in Two items. The first is the text displayed below the label icon, and the second is the icon ICON. The following is the effect after our modification:
At this time, we see that the tab bar in the Tab Bar Controller has been automatically updated (this is why we mentioned earlier that the Tab BarController does not need to be modified):
Similarly, we can delete the other ViewController that comes with it and add the TableViewController we need, and then repeat the operation we just did:
4 Add a new Controller
The Tab BarController we dragged in earlier has only two View Controllers, and there are only two tab icons in the tab bar. Here we add a new view controller TableViewController
Here we can see that when the newly added TableView Controller class Tab Bar Controller is not connected, the tab bar only has two tabs. At the same time, there is no tab bar in the newly added TableView Controller. Then we connect the Tab Bar Controller according to the method just now, and the operation is exactly the same.
You can see that after connecting the Tab Bar Controller and the TableView Controller, the number of tab bar labels in the Tab Bar Controller automatically becomes 3. Similarly, we can modify the label style in the newly added TableViewController.
At this point, a tab bar multi-page UI with three TableView tabs is ready. The next step is to add the Controller and Model, which we will not introduce here.
5 Runs
In order to see the switching of tabs, we added Label to each page, indicating the switching of pages:
6 Reference
For specific methods, you can also refer to this video, which is more detailed:
http://teamtreehouse.com/library/build-a-selfdestructing-message -iphone-app-2/designing-and-starting-the-app/a-storyboard-with-a-tab-bar-controller
Notes
here The tab bar multi-page application is just a single tab bar display. We have not yet mentioned how to enter the tab bar page, how to enter it, and what the differences are. We will discuss it in detail in the article "Tab Bar Controller and Navigation Bar" later. narrate.
The Demo source code can be downloaded here:
Guo Liu
First edited on Saturday, 8/23/2014

随着Web应用程序的快速发展,越来越多的开发者将目光投向了各种新兴的Web开发框架和架构设计模式。其中一个备受瞩目的设计模式就是MVVM(ModelViewViewModel)架构模式。MVVM采用了一种现代化的设计模式,通过将UI和业务逻辑相分离,使得开发人员能够更好地管理和维护应用程序。此外,MVVM减少了不必要的耦合,提高了代码的可重用性和灵活性,

“msedge.exe”指的是“Microsoft Edge”网页浏览器软件;“Microsoft Edge”是由Microsoft开发的网页浏览器,该浏览器在2015年被正式命名,并且内置在了Windows10版本中;该浏览器与IE浏览器相比,Edge将支持现代浏览器功能,比如扩展。

卸载程序的文件名是“uninstall.exe”或“uninst.exe”,是用以协助使用者将软件自电脑中删除的一种电脑软件。使用方法:1、在文件资源管理器中挖掘并导航到应用程序EXE文件所在的文件路径;2、通过文件路径打开应用程序的安装目录,找到“uninstall.exe”文件;3、双击卸载文件“uninstall.exe”即可开始程序删除过程。
![如何修复 Windows 11 上的应用程序无法打开问题 [已解决]](https://img.php.cn/upload/article/000/465/014/168300240866363.png)
微软最新发布的Windows11,已经证明是Windows10的更好版本,其结构变化、更人性化、重新排列的任务栏等。尽管Windows11是其中一个优秀的版本。许多Windows用户注意到他们的Windows11PC上存在一个不寻常的问题,他们无法启动大多数Windows11应用程序。无论他们尝试启动应用程序多少次,它只是简单地崩溃并且无法在系统上打开。突然发生这种情况可能有很多原因,下面列出了一些原因。Windows更新服务已停止。对系统的病毒攻击。系统上的用户帐户存

explorer.exe应用程序错误的解决办法:1、按下键盘上的“win”+“R”组合键,再打开的运行窗口中输入命“inetcpl.cpl”;2、在上方选择“高级”选项卡,在下方点击“重置”;3、在弹出来的窗口中,勾选“删除个人设置”,勾选后点击下面的“重置”。如果以上操作无法解决问题,请检查电脑是否有木马,这个时候建议重装系统,安装一个原版或者纯净版的系统。

随着Internet的发展,越来越多的应用程序需要实现地图可视化展示。本文将介绍如何使用PHP和OpenLayers创建地图应用程序。一、OpenLayers介绍OpenLayers是一个JavaScript开源库,可以展示动态地图。除了展示标准的WMS、WFS和GoogleMaps,OpenLayers还可以展示自定义的地图,可以展示矢量数据,支持地图放

<p><strong>邮件应用程序</strong>是Windows11内置的一个非常有用的电子邮件客户端。它允许您从一个位置管理所有邮件帐户。虽然Mail应用程序非常有用,但有时可能需要重置,有时也需要重新安装,原因有多种。在本文中,我们将通过一些简单的步骤说明如何从Windows11轻松卸载Mail应用程序,以及如何轻松地从MicrosoftStore将其取回。</p>&l

随着全球定位系统(GPS)和卫星影像技术的飞速发展,地理信息系统(GIS)已经成为了一个重要的应用领域。GIS不仅限于地图制作和分析,也被广泛应用于环境管理、土地管理、城市规划等领域。而WebGIS应用程序的开发,可以使得用户在任何地点、任何时间、通过任何设备进行GIS数据的查询、分析和管理,具有极大的应用前景。Django是一个基于Python语言的We


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
