How to get Pixate v2 Real Time CSS working with Xcode 5

∥☆過路亽.° 提交于 2019-12-24 17:11:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!