ios - How to transfer IBAction method of the class into another class -
i have created ibaction method of storyboard. how can access method class?
- (ibaction)display:(id) sender { }
try using 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]; }
Comments
Post a Comment