惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
T
Threatpost
C
CERT Recently Published Vulnerability Notes
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
Project Zero
Project Zero
H
Heimdal Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
W
WeLiveSecurity
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
News | PayPal Newsroom
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
S
Securelist
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
NISL@THU
NISL@THU
N
News and Events Feed by Topic
S
Security Affairs
The Last Watchdog
The Last Watchdog
T
Tor Project blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
C
Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security

博客园 - Bruce Lee

Android的界面设计规范-7 Android的界面设计规范-6 Android的界面设计规范-5 Android的界面设计规范-4 Android的界面设计规范-3 Android的界面设计规范-2 Android的界面设计规范-1 Monotouch 移动位于键盘下的内容,自动滚动被键盘遮住的内容 RESTful Web Services,客户端Silverlight提交POST数据报错 Monotouch Copy item from album(从相册拷贝文件出来) Monotouch Save Image To Application(保存相册图片到你的应用程序) Monotouch 项目选择Storyborads还是XIBs Montouch 定义一个定制的 View Control类 Monotouch 视图管理周期 Montouch多视图的创建与销毁 Monotouch 常用例子代码 Monotouch在IPAD与IPhone使用UIImagePickerController的图片选择不同的代码 Montouch 增加图片到模拟器(Simulator)的相册中 Monotouch Table View 里面动态增加Table View Cell Switch 触发Switch事件 程序崩溃
Monotouch中使用UINavigationController
Bruce Lee · 2012-10-15 · via 博客园 - Bruce Lee

1.使用MonoDevelop创建一个Window-based project

2.右键点击解决方案,Add | New File… | iPhone View with Controller,命名为FirstViewController

3.增加另外一个iPhone View with Controller,命名为SecondViewController

4.到目前为止我们有两个空的视图(控制器),我们可以在我们的iPhone应用程序中显示这2个视图。默认情况下,它们将不会显示,所以我们需要应用程序增加一个UINavigationController对象,它用来显示和隐藏这些视图。 管理一个UIViewController对象的堆栈,它允许你以编程方式显示指定控制器/视图。通过XCode可以很容易地添加UINavigationController到应用程序程序。在MonoDevelop的解决方案窗口双击MainWindow.xib。打开后,在“Library”窗口中单击“Objects”选项卡上,找到“Navigation Controller”项目,拖放到的MainWindow.xib窗口。

5.接下来,从AppDelegate类的引用UINavigationController的对象。 AppDelegate中的CocoaTouch中的一个类,相当于在WPF和Silverlight程序的Application类。为了给UINavigationController一个引用,必须添加一个“outlet”到AppDelegate类。在XCode中增加的outlet,就可以引用UI对象,并在代码中创建了相应的属性变量。命名为navController。

6.在FirstViewController与SecondViewController的View中增加一按钮,按钮事件控制跳转的,代码如下:

image

事件内代码

var secondview = new SecondViewController();

this.myButton.TouchUpInside += delegate{

var nc = base.NavigationController;

nc.PushViewController(secondview,true);

}

作者:Bruce Lee
出处:http://www.cnblogs.com/BruceLee521
本博原创文章版权归博客园和本人共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出作者名称和原文连接,否则保留追究法律责任的权利。