NUI: style your iOS app with style sheets
github.com
github.com
As an iOS developer however, I find that using Interface Builder or pure code is much more flexible and simpler to use than a CSS stylesheet.
[[UILabel appearance] setStyleBlock:^(id view) {
UILabel *label = view;
label.backgroundColor = [UIColor clearColor];
}];
The advantage is that you can style properties that aren't supported by UIAppearance natively, since a block just gets run when the view is ready to be styled. You also can style subviews from the same block (ie. title label inside of a warning view should be red and bold)."Long gone are the days of tedious image slicing [..]. With Pixate, designers and developers alike can conceive, [..]. etc., etc."
I really hate such "tricks". If it's a concept, just say so in the landing page - we won't kill you! We will find out in the end - it's hardly a secret, and will be pissed when we click "Download SDK Now!" and find out it's in the early stages of development...
I might've been interested in backing them up on KickStarter, but I really don't trust them now (because of this trick they pulled on me). What if their framework has a serious bug (a severe memory leak)? Can I trust these guys to tell me so if I build my (imaginary) $50,000 app using their framework? No, I don't feel that confident.
Pixate appears to be a large project and very ambitious, so I am surprised to see NUI appear, seemingly out of nowhere.
As it happens, I was going to build something like that for an app I'm due to start tomorrow, but now I don't have to.
As others have mentioned it's not really a "drop-in solution" and it doesn't look to be much faster than just creating categories that return styled objects you need eg: [UIButton greenButtonWithText:@"Sign up"]; [UILabel headerLabelWithText:@"etc, etc"];
That assumes that you haven't changed the licence at all.
[Edit: License does seem unchanged. I've sent a Pull request if the creator does want to make this change.]
It's a pretty neat concept, particularly if you have web content that needs to be styled in coordination with your app's chrome.
HN discussion url: http://news.ycombinator.com/item?id=4880974
I could never use this based on that requirement.
Of course, usually my first glances are wrong.
The fact you have to litter you code with NUI references is a non-starter for me.
They should have leveraged the UIApperance proxy. I know they have some reason about gradients or something for not using it, but that shouldnt force a compromise in the design.
UIAppearance actually supports any property on any UIView, including your own custom classes. The UI_APPEARANCE_SELECTOR declaration on the UIKit properties is little more than for the purpose of documentation to make it clear what is officially supported and tested for.