In your storyboard select first view controller then control
drag from first view to second view controller
Select Push from list you see.
Select line that is newly added between two view
controllers.
Assign name to it.(like "PushSegue")
Added Code in your First view controller on button Click .
[self performSegueWithIdentifier:@"PushSegue" sender:self];
Then add Delegate for PrepareForSegue
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"ListMenuSegue"])
{
SecondViewController *SecondVC = [segue destinationViewController];
userViewController.Lable_String=@"Text_to_send"; //You will Get error here for Lable_String ->"Property not found etc" Becuse
}
Add This code in your secondViewController.h
@property(strong,nonatomic)NSString *Lable_String;
Then Print String Value in secondViewController.m
- (void)viewDidLoad
{
[super viewDidLoad];
NSLog(@"%@",Lable_String);
}