Objective c 选择器没有已知的类方法

Objective c 选择器没有已知的类方法,objective-c,ios,xcode,delegates,method-call,Objective C,Ios,Xcode,Delegates,Method Call,.h文件: @interface WibraryViewController : UIViewController <UIAlertViewDelegate> { IBOutlet UIActivityIndicatorView *activityIndicatorView; } + (void) notifyServerOfFileOpening:(NSString *) docName; 另一个类中生成“选择器的未知类方法”错误的行: [WibraryViewC

.h文件:

@interface WibraryViewController : UIViewController <UIAlertViewDelegate> {    
    IBOutlet UIActivityIndicatorView *activityIndicatorView;
}
+ (void) notifyServerOfFileOpening:(NSString *) docName;
另一个类中生成“选择器的未知类方法”错误的行:

[WibraryViewController notifyServerOfFileOpening];
我猜这可能与使用UIAlertViewDelegate委托有关,但我还没有真正掌握委托是如何工作的。 当然,它也可能是完全不同的东西

我希望有人能指出问题所在?谢谢。

您忘了传递“docName”参数。你在打电话吗

[WibraryViewController notifyServerOfFileOpening];
而不是

[WibraryViewController notifyServerOfFileOpening:@"YourDocName"];

希望有帮助;)

您应该添加一个参数docName:

[WibraryViewController notifyServerOfFileOpening:yourDocName];

当前使用的选择器是
notifyServerOffileOning
,但必须使用的选择器类似于
notifyServerOffileOning:

哇-猜猜谁觉得自己很愚蠢?非常感谢你。只要网站允许,我会尽快接受你的答复。
[WibraryViewController notifyServerOfFileOpening:yourDocName];