Inherits from NSObject
Declared in CRNib.h

Overview

Instances of the NSNib class serve as object wrappers, or containers, for the HTML content serverd by instances of CRViewController. An CRNib object keeps the contents of a nib file resident in memory, ready for instantiation.

Criollo follows the same paradign as Cocoa and UIKit with regards to view controllers and nibs. The main difference is that Criollo expects an HTML document as the nib’s contents.

A note on Templating

If you prefer to use a templating language to write html, the way to do it to compile the file at build time and copy it to the bundle’s resource directory. Criollo Web uses jade as its template language for example.

Tasks

Other Methods

Initializing a CRNib

Properties

data

@property (nonatomic, strong, readonly) NSData *data
Discussion

The contents of the nib.

Declared In

CRNib.h

name

@property (nonatomic, strong, readonly) NSString *name
Discussion

The nib name

Declared In

CRNib.h

Instance Methods

initWithNibNamed:bundle:

- (instancetype)initWithNibNamed:(NSString *)nibName bundle:(NSBundle *_Nullable)bundle
Discussion

Creates a new CRNib object from a file qith the given nibName, in the given bundle.

The method will look for a file named nibName.html inside the Resources folder of the specified bundle.

Parameters

nibName

The base name of the nib file

bundle

The bundle in which to locate the file

Return Value

A CRNib object or nil if the file was not found

Declared In

CRNib.h