Protocol conformation error Objective C

ساخت وبلاگ

Vote count: 0

In DataProvider.h

@protocol NewDataProviderProtocol
- (void)fetchNewData;
@end

In SomeClass

#import DataProvider.h
@interface SomeClass :NSObject <NewDataProviderProtocol>
@end

When I try to make SomeClass conform to NewDataProviderProtocol it says,

No type or protocol named 'NewDataProviderProtocol'

It's weird since I already imported header DataProvider.h in which the protocol is declared.

So I forward declare the NewDataProviderProtocol before interface of SomeClass but xcode was

Cannot find definition for **NewDataProviderProtocol**

What's the reason and the workaround for this?

asked 1 min ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 198 تاريخ : جمعه 17 ارديبهشت 1395 ساعت: 13:25