开发者

Methods of an object which implements a protocol I've created aren't called

I've created a protocol to manage data source updates.

but invoking methods of the object which implements the protocol won't work...

I've checked if the objects conforms to the protocol with: conformsToProtocol

and the result is no although in the header of the object's class i've declared the protocol:

 @interface M开发者_Python百科yClass : NSObject <DataSourceProtocol> 
 {
     ...

and implemented the methods...

What could be the problem?

Thanks!


Sounds like you forget to point the DataSourceProtocol to the viewController.

Something like this in viewController:

_tableView.dataSource = self;

I can't comment the question, so I make above as an answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜