Handy UIKit Debugging Functions

I don’t know how many times I had typed something like

NSLog(@"self.bounds (%g,%g,%g,%g)"
        self.bounds.origin.x,
        self.bounds.origin.y,
        self.bounds.size.width,
        self.bounds.size.height);

before I discovered that UIKit has the following handy string conversions functions

NSString* NSStringFromCGAffineTransform (
                    CGAffineTransform transform);


NSString* NSStringFromCGPoint (
                    CGPoint point);


NSString* NSStringFromCGRect(
                    CGRect rect);


NSString* NSStringFromCGSize(
                    CGSize size);


NSString* NSStringFromUIEdgeInsets(
                    UIEdgeInsets insets);

Reference
UIKit Function Reference

About idz

A professional software engineer dabbling in iOS app development.
This entry was posted in Code Snippets and tagged , , , . Bookmark the permalink.

Leave a Reply