I have a quick protocol:
import Foundation @objc protocol ReformerProtocol { func reformDataWithManager(apiManager: FSAPIClient) -> NSDictionary }
In my Objective Cm, if I define a method like:
- (NSDictionary *)fetchDataWithReformer:(id<ReformerProtocol>)reformer { }
it works fine, but if I declare this method in a .h file:
- (NSDictionary *)fetchDataWithReformer:(id<ReformerProtocol>)reformer;
Error:
No type or protocol named 'ReformerProtocol'
Not sure why.
source share