Reputation: 1840
I have this framework XXUIKit.framework
in within that i have a protocol defined as XXConfigurable.swift
@objc(XXUIConfigurable)
protocol XXUIConfigurable {
func configureItem(indexPath: NSIndexPath, data:AnyObject);
}
The Classes internal to the framework can find this protocol just fine. Just when I attempt to use it outside of the framework:
import XXUIKit
...
func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView {
let header = collectionView.dequeueReusableSupplementaryViewOfKind(kind, withReuseIdentifier: sections[indexPath.row].cell, forIndexPath: indexPath) as? XXUIConfigurable
return header
}
it cannot find the type:
error: use of undeclared type 'XXUIConfigurable'
the main app can find and use other classes from XXUIKIt.framework
.
Upvotes: 1
Views: 1145
Reputation: 1840
Sigh, apologies but I worked it out.
public protocol XXUIConfigurable
Upvotes: 2