0

How to connect with xib button to storyboard in iPhone? I have one project that every think contain storyboard I want to add this project to viewcontroller xib project, Now how to connect that xib button to storyboard programmatically. How to go form 1 view to storyboard view controller? How to connect that view controller button to story board?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mohammed
  • 97
  • 11
  • i want to go from 1 view to storyboard view controller.how to connect that view controller button to story board. – Mohammed Mar 18 '13 at 06:58
  • Look at this http://stackoverflow.com/questions/8198698/linking-child-view-controllers-to-a-parent-view-controller-within-storyboard – βhargavḯ Mar 18 '13 at 07:01

1 Answers1

0

If you have not create a Segue for your viewcontroller in storyboard, then you need to get the viewController from storyboard with you view identifier & need to apply pushViewController on action/event.

Example:

@"MainStoryboard_iPhone" = Storyboard file name @"TabBarCntrl" = View controller identifier name

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];

UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"TabBarCntrl"];
[self.navigationController pushViewController:viewController animated:YES];
Akbari Dipali
  • 2,173
  • 1
  • 20
  • 26
Karamjeet Singh
  • 460
  • 1
  • 5
  • 16