0

我还没有找到任何关于如何使用 Pixate Freestyle 和 Xcode 5 获取实时 css 更新的参考资料。如果有人可以提供 AppDelegate 中“didFinishLaunchingWithOptions”中的内容的代码,那将会很有帮助。谢谢。

4

2 回答 2

1

这是一个较旧的问题/答案,您可以用作参考:How to get Pixate v2 Real Time CSS working with Xcode 5

请注意,Freestyle 已将基础对象从 Pixate 重命名为 PixateFreestyle。

于 2014-04-13T20:11:18.783 回答
0

谢谢保罗。使用那篇文章我能够让它工作。这是我放在 AppDelegate.m 文件中的代码。

导入“AppDelegate.h”

导入“PixateFreestyle/PixateFreestyle.h”

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:     (NSDictionary *)launchOptions
{
    //Initalize Pixate
    self.window.styleMode = PXStylingNormal;
    //Dynamically modify the Pixate stylesheet while the Simulator is running
    #ifdef DEBUG
    [PixateFreestyle styleSheetFromFilePath:@"/path/to/project/default.css" withOrigin:PXStylesheetOriginApplication];
    PixateFreestyle.currentApplicationStylesheet.monitorChanges = YES;
    #endif
    return TRUE;
}
于 2014-04-15T14:40:23.337 回答