I have this method in an external view controller APICallsViewController.m that I want to call when a user touches a button from another view controller MoreInfoCtrl.m. How would I go about doing this?
I’ve made the import directive in MorInfoViewController.m #import "APICallsViewController.h"
This is for the Facebook API integrating it into an iOS app.
/*
* Dialog: Request - send to a targeted friend.
*/
- (void)apiDialogRequestsSendTarget:(NSString *)friend {
currentAPICall = kDialogRequestsSendToTarget;
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Learn how to make your iOS apps social.", @"message",
friend, @"to",
nil];
HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
[[delegate facebook] dialog:@"apprequests"
andParams:params
andDelegate:self];
NSLog(@"Request - send to a targeted friend");
}
Use
NSNotificationto add observer and then post notification on that button touch.