문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top