MCEInAppTemplateRegistry Class Reference

Inherits from NSObject
Declared in MCEInAppTemplateRegistry.h
MCEInAppTemplateRegistry.m

Overview

The MCEInAppTemplateRegistry class is used to tie inApp template names to display handlers.

+ sharedInstance

This method returns the singleton object of this class.

+ (instancetype)sharedInstance

Discussion

This method returns the singleton object of this class.

Declared In

MCEInAppTemplateRegistry.h

– registerTemplate:hander:

The registerTemplate:handler: method records a specific object to handle templates of the specified name.

- (BOOL)registerTemplate:(NSString *)templateName hander:(NSObject<MCEInAppTemplate> *)handler

Parameters

templateName

An identifier that this template can handle.

handler

The template that provides the display objects. Must implement the MCEInAppTemplate protocol.

Return Value

Returns TRUE if the template was able to register and FALSE otherwise.

Discussion

The registerTemplate:handler: method records a specific object to handle templates of the specified name.

Declared In

MCEInAppTemplateRegistry.h

– handlerForTemplate:

The handlerForTemplate: method returns the registered handler for the specified template name.

- (id<MCEInAppTemplate>)handlerForTemplate:(NSString *)templateName

Parameters

templateName

An identifier tying a template name to an object that handles it.

Return Value

Returns the template handler object.

Discussion

The handlerForTemplate: method returns the registered handler for the specified template name.

Declared In

MCEInAppTemplateRegistry.h