Questions tagged [swizzle]

changing the implementation of an existing selector in Objective-C.

21 questions
0
votes
0 answers

Method swizzling on NSObject, does not work with UIView

Yet another method swizzling question, not asked before. I'd like to monitor all release calls in my application, thus I decided to use method swizzling, on NSObject, so that it would be possible to monitor of all classes. The actual code has been…
0
votes
0 answers

How to insert a custom method when a system method call?

I'm translating an Objective-C project to Swift. I want to perform custom method when a system method is calling. Code in Objective-C: He used a C-Type method, swizzling method. perform custom method and continue running system method: void…
Y.Kay
  • 31
  • 3
0
votes
0 answers

Is it possible to 'Swizzle' Java classes for Android?

Method swizzling in iOS allows the developer to change the implementation of a type of class at run time. For example, instead of adding code to every view controller, swizzling allows one method to be written, and every view controller will use…
Alex Wilson
  • 1,773
  • 1
  • 12
  • 18
0
votes
1 answer

Swizzling is not working for class methods

Swizzling is not performing dynamic method exchanging . This the code i used.i heard that it is an solution where Dependency injection unable to do in XCTest in xcode 7. can you give me explanation on Swizzling over DI(Dependency) with example…
MuraliMohan
  • 1,063
  • 1
  • 11
  • 30
-1
votes
1 answer

objective-c override system method

I find a c++ system method causes crash in ios and I try to swizzle the method. However, I do not how to do that because it's a method of a c++ class. Anyone know whether can I do that?
user5612625
-2
votes
1 answer

How to hook (swizzle) methods in Swift?

Is there any easy way to hook (swizzle) methods in Swift?
Yanni
  • 580
  • 2
  • 6
  • 21
1
2