我在代码端更改 css 文件。当我使用 Pixate 时,它运行良好。我用 Freestyle 更新了我的依赖项,但我使用updateStylesForAllViews
它不再工作了。我必须重新启动我的应用程序才能完成任务。任何想法 ?
- (void)applyCurrentTheme
{
#if TARGET_IPHONE_SIMULATOR || TARGET_IPAD_SIMULATOR
PixateFreestyle.currentApplicationStylesheet.monitorChanges = YES;
#endif
NSString *filePath = [[NSBundle mainBundle] pathForResource:themeFileName
ofType:@"css"];
[PixateFreestyle styleSheetFromFilePath:filePath withOrigin:PXStylesheetOriginApplication];
[PixateFreestyle updateStylesForAllViews];
}