我使用以下代码
@IBOutlet weak var hashtagableTextView: UITextView!
在viewDidload
方法中:
let hashtagableDelegate = HashtagableTextInputDelegate(textView: hashtagableTextView, userDelegate: self)
hashtagableDelegate.didStartTypingHashtag = { partialHashtag in
let searchableString = partialHashtag.replacingOccurrences(of: "#", with: "")
hashtagableDelegate.showSuggestedHashtags(hashtagDatabase.filter({ $0.lowercased().contains(searchableString.lowercased()) }))
}
hashtagableTextView.delegate = hashtagableDelegate
我收到错误
模糊地使用
contains
我该如何解决?