Tag: Method-Swizzling
All the articles with the tag "Method-Swizzling".
-
Disabling Keyboard Avoidance in SwiftUI's UIHostingController
Published:• 6 min readFixing unwanted keyboard avoidance behavior in UIHostingController using runtime dynamic subclassing to override keyboard notification handling methods.
-
InterposeKit — Elegant Swizzling in Swift
Published:• 3 min readIntroducing InterposeKit, a modern Swift library for elegant method swizzling that leverages Swift 5.2's callAsFunction for type-safe Objective-C method interception.
-
The Great Mac Catalyst Text Input Crash Hunt
Published:• 8 min readDeep-dive investigation and fix for a Mac Catalyst text input crash caused by a race condition in Apple's RemoteTextInput framework.
-
A Story About Swizzling "the Right Way™" and Touch Forwarding
Published:• 8 min readLearn why traditional method swizzling breaks UIKit's touch forwarding and discover a better approach that preserves _cmd integrity.
-
Fixing What Apple Doesn't
Published:• 2 min readFix the misaligned label in iOS 7's printer controller by swizzling UIPrinterSearchingView's layoutSubviews method.
-
Adding Keyboard Shortcuts To UIAlertView
Published:• 3 min readAdd keyboard shortcuts to UIAlertView and UIActionSheet for faster simulator testing by intercepting keyboard events with Enter and Escape keys.
-
Hacking Block Support Into UIMenuItem
Published:• 12 min readImplement block support for UIMenuItem by swizzling the responder chain to enable cleaner API patterns.