IOS中两个view的切换

时间:2014-06-07 20:36:33   收藏:0   阅读:217

在ios中,rootview为PassWordViewController,secondview为SecondViewController,实现在rootview中听过一个跳转按钮实现跳转到secondview中,实现方法如下:

在PassWordViewController.h中添加button的事件

-(IBAction) landButtonPressed:(id) sender;

在PassWordViewController.m中 button的实现事件如下:

-(IBAction) landButtonPressed:(id) sender

{

            SecondViewController *logViewController=[[SecondViewControlleralloc]init];

            [self.view addSubview:logViewController.view];

 

}

IOS中两个view的切换,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!