用TABAnimated的小夥伴可能須要使用預處理回調
進行調整本身的骨架屬性。 如今能夠配合Xcode插件InjectionIII
實現實時預覽的效果,大幅提升使用效率。 須要升級版本2.4.5
git
_tableView.tabAnimated.adjustBlock = ^(TABComponentManager * _Nonnull manager) {
manager.animation(1).down(3).height(12);
manager.animation(2).height(12).reducedWidth(70);
manager.animation(3).down(-5).height(12).radius(0.).reducedWidth(-20);
};
複製代碼
預處理回調
能夠隨意調整骨架的全部參數,使用頻率很是高。
可是若是開發者頻繁地編譯運行,再進到固定頁面查看效果,這樣效率很是低。github
在開發過程當中開發者修改了某個文件,實時保存以後,InjectionIII監聽到這個文件,用Runtime將你修改的內容實時編譯、連接、運行。bash
去AppStore下載InjectionIII,啓動函數
將下面代碼嵌入對應的viewController中測試
- (void)injected {
[_tableView removeFromSuperview];
_tableView = nil;
[self viewDidLoad];
}
複製代碼
不是懶加載不須要嵌入代碼的緣由: 骨架屏內部幫你自動連接了viewDidLoad函數的加載,因爲沒法統必定位_tableView
在viewController中的地址,沒法自動化remove並釋放掉。spa
若是修改的是骨架屏預處理回調的代碼,就能夠實時看到骨架屏效果,demo全部測試用例都接入了該效果。插件