9.40. IOS storyboard (Storyboards)

发布时间 : 2025-10-25 13:32:32 UTC      

Page Views: 9 views

9.40.1. Brief introduction

Storyboards is only introduced in iOS5, and when we use Storyboards, the deployment target should be iOS5.0 or higher.

Storyboards helps us understand the visual flow of the picture, in the interface for

Create all application screens under MainStoryboard.storyboard. Example step =

1. 创建一个single view application,创建应用程序时选择 storyboard 复选框。

two。 Select MainStoryboard.storyboard, where you can find a single view controller. Add a view controller and update the view controller, as follows

storyboardInterface

3.连接两个视图控制器。右键单击”show modal(显示模式)”按钮,在左侧视图控制器将其拖动到右视视图控制器中,如下图所示:

storyboardButtonAction

4.现在从如下所示的三个显示选项中选择modal(模态)

storyboardButtonActionModal

5.更新 ViewController.h 如下所示

#import  @interface ViewController : UIViewController -(IBAction)done:(UIStoryboardSegue *)seque; @end    

6.更新 ViewController.m 如下所示

#import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -(IBAction)done:(UIStoryboardSegue *)seque{ [self.navigationController popViewControllerAnimated:YES]; } @end 

7.选择”MainStoryboard.storyboard”,并右键点击”Exit “按钮,在右侧视图控制器中选择和连接后退按钮,如下图所示

storyboardButtonExitAction

9.40.2. Output

Run the application in the iPhone device and get the following output

storyboardOutput1

Now, select the display mode and you will get the following output

storyboardOutput2

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。