FLEX是一個APP很方便的開發(fā)工具舌涨,可以用來Debug view,分析網絡請求等等抓半。
來張官網截圖:
![View Hierarchy Exploration](http://engineering.flipboard.com/assets/flex/basic-view-exploration.gif)
View Hierarchy Exploration
通過Pods安裝
pod 'FLEX', '~> 2.0', :configurations => ['Debug']
configurations指定FLEX
只在DEBUG模式中被引入喂急。
#if DEBUG
#import "FLEXManager.h"
#endif
在模擬器中可以通過點擊鍵盤的F鍵調出FLEX
。
在真機中我設置通過搖一搖調出FLEX
:
#import "UIWindow+TTFLEXSetting.h"
#if DEBUG
#import "FLEXManager.h"
#endif
@implementation UIWindow (TTFLEXSetting)
#if DEBUG
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
[super motionBegan:motion withEvent:event];
if (motion == UIEventSubtypeMotionShake) {
[[FLEXManager sharedManager] showExplorer];
}
}
#endif
擴展閱讀:
動態(tài)加載 FLEX 的越獄插件 - FLEXLoader
iOS 使用 Flipboard / FLEX 分析第三方 App