Skip to content

Instantly share code, notes, and snippets.

@wookay
Created March 21, 2011 10:49
Show Gist options
  • Save wookay/879287 to your computer and use it in GitHub Desktop.
Save wookay/879287 to your computer and use it in GitHub Desktop.
libcat Console object introspection
$ ./console.rb
ls TARGET : list target object (l) help : help (h)
> ls : list current object quit : quit (q)
> ls -r : list recursive about : about libcat Console
cd TARGET : change target object clear : clear the screen
> cd : to topViewController history : input commands history
> cd . : to self sleep N : sleep N seconds
> cd .. : to superview
> cd / : to rootViewController events : list touch events (e)
> cd ~ : to keyWindow > events record : record on/off (er)
> cd ~~ : to UIApplication > events play : play events (ep)
> cd 0 : at index as listed > events cut N : cut N events (ex)
> cd 1 0 : at section and row > events clear : clear events (ec)
> cd -1 0 : at index on toolbar > events replay NAME : replay events (ee)
> cd Title : labeled as Title > events save NAME : save events (es)
> cd view : to property > events load NAME : load events (el)
> cd UIButton : to class
> cd 0x6067490 : at memory address enum ENUMTYPE : enum type info
properties TARGET : list properties (p) > enum UITextAlignmentLeft
> text : property getter > enum UITextAlignment
> text = hello : property setter
pwd : view & controller hierarchy map ARGS
manipulate TARGET : manipulate properties UI > view.subviews.map text frame.size
open : open Safari UI
touch TARGET : touch target UI (t) class introspection
back : popViewController UI (b) > classInfo TARGET (c)
rm TARGET : removeFromSuperview UI > methods TARGET (m)
flick TARGET : flick target UI (f) > classMethods TARGET
png TARGET : capture target as image UI > ivars TARGET
fill_rect RECT : fill rect UI > protocols TARGET
add_ui UILabel : add UI > UIApplication
hit : hitTest UI on/off > UITableViewDelegate
RootViewController> c
@interface RootViewController : UITableViewController
- 11 methods ...
RootViewController> cd UITableViewController
$0 = <RootViewController: 0x4c50940>
UITableViewController> c
@interface UITableViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> {
id _keyboardSupport;
struct _tableViewControllerFlags;
int _tableViewStyle;
}
- 21 methods ...
UITableViewController> ivars
id _keyboardSupport;
struct _tableViewControllerFlags;
int _tableViewStyle;
UITableViewController> protocols
<UITableViewDataSource, UITableViewDelegate>
UITableViewController> cd UIApplication
$0 = UITableViewController
UIApplication> c
@interface UIApplication : UIResponder <UIActionSheetDelegate> {
struct _applicationFlags;
id _delegate;
id _editAlertView;
id _event;
id _exclusiveTouchWindows;
id _hideNetworkActivityIndicatorTimer;
id _motionEvent;
int _networkResourcesCurrentlyLoadingCount;
id _remoteControlEvent;
int _remoteControlEventObservers;
id _statusBar;
id _statusBarWindow;
id _topLevelNibObjects;
void* _touchMap;
id _touchesEvent;
}
+ 11 classMethods ...
- 403 methods ...
UIApplication> classMethods
+(void) _startWindowServerIfNecessary ;
+(int) interfaceOrientationForString:(id)string ;
+(char) isRunningEventPump ;
+(char) isRunningInStoreDemoMode ;
+(char) registerForSystemEvents ;
+(char) rendersLocally ;
+(id) sharedApplication ;
+(char) shouldMakeUIForDefaultPNG ;
+(int) statusBarStyleForString:(id)string ;
+(id) stringForInterfaceOrientation:(int)orientation ;
+(id) stringForStatusBarStyle:(int)style ;
UIApplication> UITableViewDelegate
@protocol UITableViewDelegate <NSObject, UIScrollViewDelegate>
@optional
tableView:accessoryButtonTappedForRowWithIndexPath:
tableView:accessoryTypeForRowWithIndexPath:
tableView:didDeselectRowAtIndexPath:
tableView:didEndEditingRowAtIndexPath:
tableView:didSelectRowAtIndexPath:
tableView:editingStyleForRowAtIndexPath:
tableView:heightForFooterInSection:
tableView:heightForHeaderInSection:
tableView:heightForRowAtIndexPath:
tableView:indentationLevelForRowAtIndexPath:
tableView:shouldIndentWhileEditingRowAtIndexPath:
tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:
tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:
tableView:viewForFooterInSection:
tableView:viewForHeaderInSection:
tableView:willBeginEditingRowAtIndexPath:
tableView:willDeselectRowAtIndexPath:
tableView:willDisplayCell:forRowAtIndexPath:
tableView:willSelectRowAtIndexPath:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment