How to extend an Objective-C class with Swift in a framework?
In a similar case, Tie's answer really helped me but it didn't work for me, I had to add @objc for the method:
public extension SearchBarWidget {
@objc public func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
self.endEditing(true)
}
}
The SearchBarWidget class was @objc public
signatured.
Have you tried making the extension and function public?
public extension Sample {
public func PrettyPrint () {
print("\(x)")
}
}