0

我在一个外部视图控制器APICallsViewController.m中有这个方法,当用户触摸另一个视图控制器的按钮时我想调用它MoreInfoCtrl.m。我该怎么做呢?

我已经在MorInfoViewController.m #import "APICallsViewController.h"

这是为了将 Facebook API 集成到 iOS 应用程序中。

/*
 * 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");

}
4

1 回答 1

1

用于NSNotification添加观察者,然后在该按钮触摸时发布通知。

于 2012-05-17T09:37:44.370 回答