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 に答える