简体   繁体   中英

cannot find protocol declaration for NSObject

I was creating an NSObject class for doing web service. But while creating the protocol ,an error comes displaying"cannot find protocol declaration for NSObject " .In Xcode 4 I never came across such problems.Now I am using Xcode 6. Pls help me. Code is as below.

@protocol web <NSObject>
-(void)(NSArray *)urlArray;    
@end

#import <Foundation/Foundation.h>
@interface Webclass : NSObject    
@end

Write your protocol under #import and put name on your method

#import <Foundation/Foundation.h>

@protocol web <NSObject>
-(void)methodName:(NSArray *)urlArray;
@end
@interface Webclass : NSObject
@end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM