Show TOC

Adding Configuration-Based Tiles to Programmed View ControllersLocate this document in the navigation structure

You can retrieve a configuration-based tile using the MAFUIManager tileByIdentifier: API.

The Extensibility Framework generates the required tile, or returns nil if it cannot be built due to a malformed or missing configuration.

This code demonstrates how to call the tileByIdentifier: API to create a tile and add it as a subview to a coded view controller’s view:
// CustomViewController.h
@property(nonatomic, retain) MAFTile* subtile;
// CustomViewController.m
@synthesize subtile;
     self.subTile = [[MAFUIManager sharedInstance] tileByIdentifier:@"AddressTile"];
     subTile.view.frame = CGRectMake(30, 80, 320, 360);
    [self.view addSubview:subTile.view];

Retain the tile that provides the subviews to be embedded in the programmed view controller, or, in ARC-enabled projects, mark it as a strong property.