问题
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.
Anybody know how to get this working in version 2.0.1 of Pixate?
回答1:
Assuming you have followed the latest instructions for installing version 2.x found here: http://www.pixate.com/docs/framework/ios/latest/getting-started/
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
}
Hopefully that helps.
来源:https://stackoverflow.com/questions/20526864/how-to-get-pixate-v2-real-time-css-working-with-xcode-5