I want to call this method:
- (void)getUserFriendTargetDialogRequest {
currentAPICall = kAPIFriendsForTargetDialogRequests;
[self apiGraphFriends];
}
from this conditional statement that’s in another viewcontroller:
if (idx == 2) {
NSLog(@"you touched menu 2");
APICallsViewController *apiViewController = [APICallsViewController alloc];
[self.navigationController pushViewController:apiViewController animated:YES];
}
can anyone help with the syntax on this?
thanks so much
First, you probably also want to init your APICallsViewController via:
Then if that getUserFriend… is a method of APIViewController, you can do this:
However, since you aren’t passing any arguments in from your other view controller, you might consider calling it in the init method, or the viewDidLoad method of APICallsViewController.