InAppSettings keyboardDidHide or resignedFirstResponder

237 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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.