Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
0 votes
0 answers
59 views

I am trying to implement method swizzling in Swift to intercept touchesBegan and touchesEnded methods across all UIResponder instances. However, I'm encountering issues where the original methods ...
Sajal Gupta's user avatar
0 votes
1 answer
142 views

I am using AsyndDisplayKit/Texture where: https://github.com/TextureGroup/Texture/blob/923901a1cebf0b6c51627aca2a6748dee84af143/Source/ASTextNode.mm#L934 ASTextNode has this function: + (CGColorRef)...
sudoExclamationExclamation's user avatar
1 vote
1 answer
154 views

I'm trying to intercept all "syscall"s for my code. I'm able to receive the calls, but for some reason my implementation of syscall is not equivalent, because at some point the program ...
Papers.ch's user avatar
  • 128
0 votes
1 answer
128 views

As I know, method swizzling with method_exchangeImplementations(A, B) function exchanges A method and B method in runtime. If I get method with: let A = class_getInstanceMethod(UIViewController.self, #...
Alfred Woo's user avatar
1 vote
2 answers
78 views

I have an internal class that adoptsUIScrollViewDelegate, but does not implement scrollViewWillEndDragging(_:withVelocity:targetContentOffset:). I want to add this method to the class using ...
Balázs Vincze's user avatar
0 votes
0 answers
40 views

I have gone through so many article and have a good idea how we should implement method swizzling. But I'm getting this error while writing the original #selector for UserDefault class. extension ...
VIJAY SINGH RAGHAV's user avatar
3 votes
2 answers
322 views

I'm fixing bugs in someone else's closed-source app. In macOS, scrollbars can be set in System Preferences to display "always" (NSScrollerStyleLegacy), "when scrolling" (...
Wowfunhappy's user avatar
0 votes
1 answer
158 views

I'm experimenting with adding a form of theming support to iOS by swizzling UIColor constructor methods. I'm having trouble with a scenario coming from a storyboard when a control uses a "named ...
Simon McLoughlin's user avatar
0 votes
1 answer
374 views

I'm trying to capture initialisation of InputStream with file URL in Swift. I've successfully implemented such capture in Objective-C for NSInputStream class. The issue is that after exchanging ...
KeksimvsMaximvs's user avatar
4 votes
1 answer
2k views

I'm trying to swizzle a private framework's method to perform some custom logic and then would like to call the original implementation. Code: class SwizzlingHelper { private struct Constants { ...
Kunal Shah's user avatar
  • 1,131
0 votes
1 answer
814 views

I'm getting strange behavior in iOS 14 with regards to remote notifications on iOS and Firebase Cloud Messaging (FCM). DEVICE First, I cannot send Test notifications to my device from the FCM console. ...
David's user avatar
  • 333
0 votes
1 answer
123 views

I am trying to swizzle NSAttributedString but getting a compile error: extension NSAttribtuedString { @objc convenience init(swizzledString: String, attributes: [NSAttributedString.Key : Any?] { ...
Tal Zion's user avatar
  • 6,526
2 votes
1 answer
884 views

I am working on an analytics SDK which will track all the user events which view is appeared or disappeared, Which button is clicked, Which UISwitch is turned ON or OFF, UITableView is scrolled or ...
Abhishek's user avatar
  • 1,684
2 votes
1 answer
742 views

I am trying to swizzle UIImage.init(named:) but the init is not being called extension UIImage { @objc public convenience init?(swizzledName: String) { self.init(named: swizzledName) ...
Tal Zion's user avatar
  • 6,526
2 votes
1 answer
259 views

I am trying to swizzle UIImage init functions but when trying to get the instance function they return nil. Any idea? let instance = class_getInstanceMethod(self, #selector(UIImage.init(named)) let ...
Tal Zion's user avatar
  • 6,526

15 30 50 per page
1
2 3 4 5
8