blo

BlockTypeDescription

Show type signatures when logging blocks

Showing:

Popularity

Downloads/wk

0

GitHub Stars

258

Maintenance

Last Commit

9yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

BlockTypeDescription

BlockTypeDescription adds a block's type signature to its description. It makes debugging more transparent, and turns an otherwise useless description into a useful one.

Because this project replaces an existing method on the private NSBlock class, this should be used for debugging purposes only.

Example Usage

NSString * (^someBlock)(NSString *, BOOL, CGRect, float*[30]) = ^(NSString *a, BOOL b, CGRect c, float *d[30]) {
    return @"Some return value";
};
NSLog(@"This is my block! %@", someBlock);

Before

This is my block! <__NSGlobalBlock__: 0x35c0>

After

This is my block! <__NSGlobalBlock__: (id (^)(id, char, struct CGRect, float*[30]))>

License

BlockTypeDescription is available under the MIT license. See the LICENSE file for more info.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial