AppleNib - UBogun/Xojo-iosLib GitHub Wiki
Inherits from AppleObject
Memory leak check: not yet done
Status: complete
This is an implementation of UINib, the class used for handling XCode Interface builder files.
General information
Taken from Apple’s developer docs:
Instances of the UINib class serve as object wrappers, or containers, for Interface Builder nib files. A UINib object caches the contents of a nib file in memory, ready for unarchiving and instantiation. When your application needs to instantiate the contents of the nib file it can do so without having to load the data from the nib file first, improving performance. The UINib object can automatically release this cached nib data to free up memory for your application under low-memory conditions, reloading that data the next time your application instantiates the nib. Your application should use UINib objects whenever it needs to repeatedly instantiate the same nib data. For example, if your table view uses a nib file to instantiate table view cells, caching the nib in a UINib object can provide a significant performance improvement.
When you create a UINib object using the contents of a nib file, the object loads the object graph in the referenced nib file, but it does not yet unarchive it. To unarchive all of the nib data and thus truly instantiate the nib your application calls the Instantiate method on the AppleNib object.
Constructors
Constructor (NibData As AppleData, bundle as applebundle = nil): Creates a UINib object from nib data stored in memory. If Bundle is nil, this method searches in the app’s AppleBundle’s MainBundle.
Constructor (NibName as CFStringRef, bundle as applebundle = nil): Returns a UINib object initialized to the nib file in the specified bundle. If Bundle is nil, this method searches in the app’s AppleBundle’s MainBundle.
Method
Instantiate (opt. owner as appleobject = nil, opt. options as AppleDictionary = nil) As AppleArray: Unarchives and instantiates the in-memory contents of the receiver’s nib file, creating a distinct object tree and set of top level objects. Returns an autoreleased NSArray object containing the top-level objects from the nib file.