I would suggest you to have a separate parser class iTemplateParser
Then in other View Controller you can create the iTemplateParser
object.
@property (nonatomic, strong) iTemplateParser *templateData;
- (void)viewDidLoad {
NSData *theData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:templateFileName ofType:@"json"]];
self.templateData = [[iTemplateParser alloc] initWithTemplateData:[NSJSONSerialization JSONObjectWithData:theData options:NSJSONReadingMutableContainers error:nil]];
}
Now in iTemplateParser
you can define many functions as per your need.
E.g.
- (id)initWithTemplateData:(NSDictionary *)iDataDict;
- (CGRect)frameForTableView;
- (UIFont *)fontForTableView;
- (UIColor *)tableBackgroudColor;
etc.
Now this methods you can call in your ViewController
to display UI components.
Hope this will help you.