swift - 修复类型“NSNotification.Name”的任何解决方案都没有成员“UITextField”错误?
问题描述
我最近安装了一个名为“NumericKeyboard”的 pod,并收到以下错误。我已经在这里待了 2 个小时,所以任何帮助都将不胜感激。
错误 #1:类型“NSNotification.Name”没有成员“UITextField”
NotificationCenter.default.post(name: NSNotification.Name.UITextField.textDidChangeNotification, object: self.textView)
错误 #2:类型 'NSNotification.Name' 没有成员 'UITextView'
NotificationCenter.default.post(name: NSNotification.Name.UITextView.textDidChangeNotification, object: self.textView)
解决方案
它应该是
NotificationCenter.default.post(name: UITextView.textDidChangeNotification,
object: self.textView)
推荐阅读
- firebase - 在 Firestore Flutter 中计算值匹配的文档
- express - Express + connect-couchdb + passport-local
- stripe-payments - 如何延长条带取消不完整付款意图的期限
- python - Python 3 if-else 简写命令语法错误
- javascript - 如何为动态子项分配单击事件侦听器?
- r - Mclust 因小数据集而冻结
- python - Django 可写嵌套序列化器和 django-polymorphic
- flutter - 颤振钩子。在哪里“请求权限”,因为它没有 initState
- python - 使用管道将 MinMaxScaler() 应用于 RFECV()
- reactjs - 将 Redux Thunk 集成到异步查询中