Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RuiAAPeres/UIViewController-Swizzled
Used to print the structure of your application as you use it
https://github.com/RuiAAPeres/UIViewController-Swizzled
Last synced: 4 days ago
JSON representation
Used to print the structure of your application as you use it
- Host: GitHub
- URL: https://github.com/RuiAAPeres/UIViewController-Swizzled
- Owner: RuiAAPeres
- License: mit
- Created: 2013-09-09T17:43:29.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-15T22:52:58.000Z (about 6 years ago)
- Last Synced: 2024-11-06T05:11:59.603Z (6 days ago)
- Language: Objective-C
- Size: 70.3 KB
- Stars: 846
- Watchers: 28
- Forks: 132
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
UIViewController+Swizzled
=============
⚠️ I am no longer supporting this lib. :) ⚠️
=============
-------------Category used to map your way inside an application. This is specially useful when you are working with a complex path and you are new to the project. Using this category will see the name of the UIViewController you are in, plus a representation of how deep you are.
This is a companion of the my other category [NSURLConnection+Swizzled.h](https://github.com/RuiAAPeres/RPNSURLConnection-Swizzled)
**Don't forget to disable it in production code. This is only for debugging**
------------
Requirements
============Include the library:
* libobjc.dylib
And import the category where you want to use it:
* `#import "UIViewController+Swizzled.h"`
------------------------------------
Adding UIViewController+Swizzled to your project
====================================* Just add the two files inside your project (`UIViewController+Swizzled.h` and `UIViewController+Swizzled.m`).
**Or**
* CocoaPods: pod 'UIViewController+Swizzled', '~> 1.2'
-----
Usage
=====In order to get the full output you should `SWIZZ_IT` right in the AppDelegate `- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions`. If for some reason you want to stop, just `UN_SWIZZ_IT`.
```objective-c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
SWIZZ_IT;
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window makeKeyAndVisible];
// Your code...
return YES;
}
```This will output:
```
2013-09-09 18:58:42.360 Testing[25399:c07] -> UINavigationController
2013-09-09 18:58:42.361 Testing[25399:c07] ---> RPViewController
2013-09-09 18:59:55.072 Testing[25399:c07] -----> RPSecondViewController
2013-09-09 18:59:57.367 Testing[25399:c07] -------> RPThirdViewController
2013-09-09 18:59:58.801 Testing[25399:c07] -----> RPSecondViewController
2013-09-09 19:00:00.282 Testing[25399:c07] -------> RPThirdViewController
2013-09-09 19:00:01.906 Testing[25399:c07] ---------> RPViewController
2013-09-09 19:00:03.515 Testing[25399:c07] -------> RPThirdViewController
2013-09-09 19:00:04.267 Testing[25399:c07] -----> RPSecondViewController
2013-09-09 19:00:05.041 Testing[25399:c07] ---> RPViewController
2013-09-09 19:00:07.193 Testing[25399:c07] -----> RPSecondViewController
2013-09-09 19:00:08.312 Testing[25399:c07] -------> RPThirdViewController
2013-09-09 19:00:09.396 Testing[25399:c07] ---------> RPViewController
2013-09-09 19:00:10.183 Testing[25399:c07] -----------> RPSecondViewController
2013-09-09 19:00:10.905 Testing[25399:c07] -------------> RPThirdViewController
2013-09-09 19:00:12.141 Testing[25399:c07] ---------------> RPViewController
2013-09-09 19:00:13.156 Testing[25399:c07] -----------------> RPSecondViewController
```-------
License
=======This code is distributed under the terms and conditions of the MIT license.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/RuiAAPeres/uiviewcontroller-swizzled/trend.png)](https://bitdeli.com/free "Bitdeli Badge")