1

I have created IBAction method with help of Storyboard. How can access this method from another class?

- (IBAction)display:(ID) sender
{
}
Stalin Pusparaj
  • 741
  • 9
  • 11

1 Answers1

0

Try using as below FirstViewController.h

@interface FirstViewController: UIViewController
- (void)GetItNow;

FirstViewController.m

- (void)GetItNow{
    NSLog(@"I acheived");    } 

  - (IBAction)goToSecondView:(id)sender {

    SecondViewController* Second= [[SecondViewControlleralloc] initWithNibName:@"SecondViewController" bundle:nil];
    rqVC.addId = self.addId;
    [self.view addSubview:Second.view];

}

SecondViewController.h

@property (nonatomic, assign) id delegate;

SecondViewController.m

- (IBAction)Action_LoadFunds:(id)sender {
    [self.view removeFromSuperview];
    [_delegate GetItNow];

}
Nischal Hada
  • 3,230
  • 3
  • 27
  • 57