0

I'm trying to use the dynamic updating of CSS but it does not seem to work. I'm changing the background throughout the process but nothing gets changed. Here is some pseudo code:

//When I launch the iOS simulator
button {
  background-color:red;
}
//During the process I change the value
button {
  background-color:yellow;
}

And my didFinishLaunchingWithOptions function looks like :

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window.styleMode = PXStylingNormal;

[self.window makeKeyAndVisible];


[PixateFreestyle currentApplicationStylesheet].monitorChanges = YES;
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"default.css"
                                                     ofType:@"css"];

 [PixateFreestyle styleSheetFromFilePath:filePath withOrigin:PXStylesheetOriginApplication];
 NSLog(@"%@", [PixateFreestyle currentApplicationStylesheet].filePath);
 [PixateFreestyle updateStylesForAllViews];
 return YES;
}

In my console I have this line :

Users/gumcher/Library/Application Support/iPhone Simulator/7.1/Applications/C16AD475-448C4106-A721-CF8E2AEE80C7/ConnexionSystem.app/default.css

Did I do something wrong? If you need more details ask me.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Gumcher
  • 1
  • 2

1 Answers1

0

I answer to my question, the path was not good I changed to

/Users/gumcher/Path/to/myapp/default.css
Gumcher
  • 1
  • 2