开发者

adding multiple views in your app

开发者 https://www.devze.com 2023-01-12 09:08 出处:网络
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开发者_Stac

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

精彩评论

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

关注公众号