Xcode UI界面调试神器-injectionIII
App Store搜索injectionIII下载即可,免费的哟。
打开injectionIII,运行即可。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #if DEBUG [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle"] load]; #endif return YES; }
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.view.backgroundColor = [UIColor redColor]; } - (void)injected { //此处的代码想怎么写就怎么写,完事了按下Ctrl+S保存一下就能再模拟器里面看到刚刚改的代码了,是不是很神奇? self.view.backgroundColor = [UIColor blueColor]; }
最开始页面显示的是红色,在injected方法里面修改界面和属性,Commond + S保存就会看到模拟器reload了。
是不是很方便啊,和写RN代码调试有差不多的意思哟!!!