CCTemplate 0.2.0

CCTemplate 0.2.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total19,392
Week0
Month0

Installs

Apps103
Pod Tries1
Test Targets20
powered by Segment

GitHub

Stars25
Watchers4
Forks5
Issues0
Contributors3
Pull Requests0

Code

Files2
LOCLines of Code 56


  • By
  • xhan

A lightweight Template Engine for Objective-C (with ARC feature required).

Template ->

hello {{ name }},
you have just won {{ value}} !
please visit {{ site }} immediately.

with given hash ->

{
   "name":  "steve",
   "value": "$100000",
   "site":  "www.cheatyouforever.com"
}

will produce ->

hello steve,
you have just won $100000 !
please visit www.cheatyouforever.com immediately.

That's all. No other features are supported.

Acts with CocoaPod

Add pod 'CCTemplate' on your Podfile to get CCTemplate up-to-date.

usage

#import "CCTemplate.h"
CCTemplate* engine    = [[CCTemplate alloc] init];
NSString*   template  = @"hello world {{name}}";
id          dict      = @{@"name":@"xhan"};
NSString*result    = [engine scan:template dict:dict];
// or just call nsstring category method
result             = [template templateFromDict:dict];

Contributors

@gearoidoceallaigh