We all love Siri’s little witty quips, but I recently read a heartwarming article over on Mashable that reflects the power of technology to change lives in ways that most of us would never appreciate. I won’t spoil
In the rare case that you need to monitor UITextField selection changes, there are very few ways to do this. The first is with method swizzling, however this involves messing with private APIs, which can be dangerous. The second is in a place you wouldn’t expect to find it, which is what I’m going to cover.
When using delegates in an object in Objective-C it is important that the delegate is only assigned within your object, and never retained. The reason for this is to prevent a retain loop, where two objects retain each other; they will never be released. The fix is simple, but can catch you off guard if you want to create an array or dictionary of delegates (using an NSDictionary or NSArray).