开发者

Navigation in an iphone application

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜