Pregunta

I have not found any reference of how to get real time css updates using Pixate Freestyle and Xcode 5. If someone could provide the code for what goes into 'didFinishLaunchingWithOptions' in the AppDelegate that would be helpful. Thanks.

¿Fue útil?

Solución

Here's an older question/answer you can use as reference: How to get Pixate v2 Real Time CSS working with Xcode 5

Note that Freestyle has renamed the base object from Pixate to PixateFreestyle.

Otros consejos

Thank you Paul. Using that post I was able to get it working. Here is the code that I put in my AppDelegate.m file.

import "AppDelegate.h"

import "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;
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top