We have received a HUGE project from outsourcing that we are trying to \"repair\". There are hundreds of view controllers within the project. Our goal is to
Here is solution for this
In your .pch file include this
#define UIViewController MyViewController
#import "MyViewController.h"
Create your new UIViewController sub class as
.h file
#import <UIKit/UIKit.h>
#ifdef UIViewController
#undef UIViewController
#endif
@interface MyViewController : UIViewController
@end
#ifndef UIViewController
#define UIViewController MyViewController
#endif
And .m file
#import "MyViewController.h"
@implementation MyViewController
- (void)viewDidLoad
{
[super viewDidLoad];
NSLog(@"Current View Class: %@", NSStringFromClass(self.class));
}
@end