开发者

adding multiple views in your app

I am working on an app in which the starting point is a map and it has a button too. What i want is that if user clicks the button it will take him to another view which just have two or th开发者_StackOverflow中文版ree buttons or other elements.

Please provide me with detail answer so that i would be able to do it.

Thanks in advance, i would really appreciate it.


Assuming your application uses the UINavigationController, this will do the trick. Make sure you #import your other view's controller file in your header. The below example assumes your controller is named ViewSettings.

- (void)gotoOtherview {
    ViewSettings *settings = [[ViewSettings alloc] initWithNibName:@"ViewSettings" bundle:[NSBundle mainBundle]];
    [self.navigationController pushViewController:settings animated:YES];
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜