开发者

Navigation in an iphone application

开发者 https://www.devze.com 2023-02-27 07:07 出处:网络
May be this one is easy.., I am new to iphone development.. My question is : I want to present a new screen after successful login, My app displays a Login screen to the user, and I have implemented

May be this one is easy.., I am new to iphone development.. My question is :

I want to present a new screen after successful login, My app displays a Login screen to the user, and I have implemented the login logic in -(IBAction)login:(id)sender method when we click on the su开发者_如何学运维bmit button.., After successful login, a new screen must be presented.


If you are using a Navigation controller you can push the new view controller onto the stack and display it through pushViewController: animated: method. You can also use presentModalViewController: animated: Or you can just add the new view as the subview of this view by [self.view addSubview:secondView];

you can refer

  1. Apple's UIViewController reference. Short and sweet (relatively).
  2. View Controller Programming Guide for iPhone OS.

UPDATE

Implement this in your current view controller

- (IBAction)buttonClicked
{
 if(validated)
 {
  // code to show goes here.
 }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号