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];
}
精彩评论