Get Updates By E-mail 

Article Written By:
Johann Dowa

Objective-C Category Providing Detailed Class Introspection In The LLDB Console

  •  
  •  
  •  
  •  
  •  

Recently I mentioned an Xcode plugin for visualizing autoresize masks from Denis Lebedev.

Here’s another interesting open source project from Denis Lebedev that provides an NSObject category wrapping enhancing the print object command for when you’re using the LLDB console.

The enhanced print object command displays the instance variables, methods, protocols used by a provided Objective-C class.

You can even display return types and arguments (in most cases).

Here’s an example from the Readme showing example console output displaying the properties of the UIDevice class:

~ po [[UIDevice class] properties]
@property (nonatomic, assign, readonly) BOOL _useSheetRotation,
@property (nonatomic, copy) @? afterAppearanceBlock,
...
@property (nonatomic, assign) {CGSize=ff} contentSizeForViewInPopover,
@property (nonatomic, assign, getter=isInAnimatedVCTransition) BOOL inAnimatedVCTransition,
@property (nonatomic, assign, readonly) BOOL inExplicitAppearanceTransition

You can find DLIntrospection on Github here.

An interesting project that can be very useful if you want quick introspection of an Objective-C class.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments