如何让 Pixate v2 Real Time CSS 与 Xcode 5 一起工作 [英] How to get Pixate v2 Real Time CSS working with Xcode 5
问题描述
我已经成功地将 pixate 2.0.1 与 XCode 5 一起用于 ios 7 项目.它真的很棒!使用实时 CSS 会更棒.这基本上是在编辑和保存 css 文件时 iPhone/iPad 模拟器将实时更新的地方.现在那只是樱桃.但不幸的是,我还不能让它工作.我遵循了 Paul Colton 在此处给出的指示:http://youtu.be/rjNrNIyEL_c.但它适用于 Pixate 的第 1 版,并使用现已过时的 PXEngine 语法.
I have successfully got pixate 2.0.1 working with XCode 5 on a ios 7 project. Its really awesome actually! And it would be even way more awesome with Real Time CSS. This is basically where the iPhone/iPad simulator will update live while the css file is edited and saved. Now thats just cherry all the way. But unfortunately I'm not yet able to get it working. I followed the directions that Paul Colton gave here: http://youtu.be/rjNrNIyEL_c. But it is for version 1 of Pixate and uses the now outdated PXEngine syntax.
有人知道如何在 Pixate 2.0.1 版中使用此功能吗?
Anybody know how to get this working in version 2.0.1 of Pixate?
推荐答案
假设您已按照以下最新说明安装 2.x 版:http://www.pixate.com/docs/framework/ios/latest/getting-started/
Assuming you have followed the latest instructions for installing version 2.x found here: http://www.pixate.com/docs/framework/ios/latest/getting-started/
然后确保您的 AppDelegate 中有以下内容:
Then make sure you have the following in your 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
[Pixate styleSheetFromFilePath:@"/Users/YourHomeFolder/Path/To/default.css" withOrigin:PXStylesheetOriginApplication];
Pixate.currentApplicationStylesheet.monitorChanges = YES;
#endif
}
希望有帮助.
这篇关于如何让 Pixate v2 Real Time CSS 与 Xcode 5 一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!