ebf / ctobjectivecruntimeadditions Goto Github PK
View Code? Open in Web Editor NEWObjc runtime additions.
License: MIT License
Objc runtime additions.
License: MIT License
I'm not sure why this library needs to add selectors to the class to do swizzling. Although that is the common method, it can have issues if the same method is swizzled more than once. Instead, why not simply return the current implementation from class_swizzleSelectorWithBlock()
, and then capture that in the block?
For example:
__block IMP originalImplementation = class_swizzleSelectorWithBlock([CTTestSwizzleClass class], @selector(helloWorldStringFromString:), ^NSString *(CTTestSwizzleClass *blockSelf, NSString *string) {
return [originalImplementation(blockSelf, @selector(helloWorldStringFromString:), string) stringByAppendingFormat:@" Hooked"];
});
That would also simplify the implementation and allow the block to simply be called without any parameter shuffling.
Maybe I'm missing something that would make this impractical or not useful?
Hi,
How could I get Block Arguments values passed ?
The one in the readme. New location: http://clang.llvm.org/docs/Block-ABI-Apple.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.