Skip to content

Instantly share code, notes, and snippets.

@nevyn
Created June 20, 2011 09:21
Show Gist options
  • Save nevyn/1035354 to your computer and use it in GitHub Desktop.
Save nevyn/1035354 to your computer and use it in GitHub Desktop.
nil -[UIViewController navigationController]
(gdb) po [tabController objectAtIndex:1]
<SPNavigationController: 0x4c20a50>
(gdb) po [[tabController objectAtIndex:1] viewControllers]
<__NSArrayI 0x50bb480>(
<SearchViewController: 0x952920>
)
(gdb) po [[[tabController objectAtIndex:1] viewControllers] objectAtIndex:0]
<SearchViewController: 0x952920>
(gdb) po [[[[tabController objectAtIndex:1] viewControllers] objectAtIndex:0] navigationController]
Can't print the description of a NIL object.
@nevyn
Copy link
Author

nevyn commented Jun 20, 2011

SPNavigationController is an almost trivial subclass of UINavigationController. tabController is a SPTabBarController, which is a subclass of UIViewController and a reimplementation of UITabBarController (for some extra fancy features).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment