InAppSettings KeyboardDidHide 或 resignedFirstResponder
我使用 InAppSettingsKit 取得了巨大成功。现在,当编辑在 inAppSettingsKit 中的 TextField 中结束时(用户点击键盘上的“完成”),我需要关闭 inAppSettingsKit 模态 VC。
InAppSettingsKit 有一些委托方法,例如:
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender
and
- (void)settingsViewController:(IASKAppSettingsViewController *)sender buttonTappedForKey:(NSString*)key
但我不知道如何知道 InAppSettings VC 中何时发生其他事情。
考虑过对 IASKAppSettingsViewController
进行子类化,但后来找不到任何好处。
有想法吗?
I'm using InAppSettingsKit with great success. Now I need to dismiss the inAppSettingsKit modal VC when editing ends in a TextField in inAppSettingsKit (the user hits Done on the keyboard).
InAppSettingsKit has some delegate methods like:
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender
and
- (void)settingsViewController:(IASKAppSettingsViewController *)sender buttonTappedForKey:(NSString*)key
but I can't figure out how to know when other things happen within the InAppSettings VC.
Thought about sub-classing IASKAppSettingsViewController
, but then couldn't find any benefit.
Ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此事件不会发送给委托。您可能需要检查 inappsettingskit.com 上描述的
kIASKAppSettingChanged
通知。如果这不适合您的情况,子类化是唯一的选择。应该相当容易挂接到一个 textField 委托并在调用
super
之前或之后完成您的工作。请务必阅读网站上的子类注释。This event isn't sent to the delegate. You might wanna check the
kIASKAppSettingChanged
notification described on inappsettingskit.com.If that doesn't work for your case, subclassing is the only option. Should be fairly easy to hook into one of the textField delegates and do your stuff before or after calling
super
. Make sure to read the subclassing notes, also on the website.