MCETemplateRegistry Class Reference
Inherits from | NSObject |
---|---|
Declared in | MCETemplateRegistry.h MCETemplateRegistry.m |
Overview
The MCETemplateRegistry class is used to specify the template names for which a template class can provide previews and full screen displays.
+ sharedInstance
This method returns the singleton object of this class.
+ (instancetype)sharedInstance
Discussion
This method returns the singleton object of this class.
Declared In
MCETemplateRegistry.h
– registerTemplate:hander:
The registerTemplate:handler: method records a specific object to handle templates of the specified name.
- (BOOL)registerTemplate:(NSString *)templateName hander:(NSObject<MCETemplate> *)handler
Parameters
templateName |
An identifier that this template can handle. |
---|---|
handler |
The template that provides the preview cells and full page display objects. Must implement the MCETemplate protocol. |
Return Value
Returns TRUE if the template can register and FALSE otherwise.
Discussion
The registerTemplate:handler: method records a specific object to handle templates of the specified name.
Declared In
MCETemplateRegistry.h
– viewControllerForTemplate:
The viewControllerForTemplate: method returns a view controller for the specified template name. This queries the registered template object for the view controller to display the full screen content.
- (id<MCETemplateDisplay>)viewControllerForTemplate:(NSString *)templateName
Parameters
templateName |
An identifier tying a template name to an object that handles it. |
---|
Discussion
The viewControllerForTemplate: method returns a view controller for the specified template name. This queries the registered template object for the view controller to display the full screen content.
Declared In
MCETemplateRegistry.h
– handlerForTemplate:
The handlerForTemplate: method returns the registered handler for the specified template name.
- (id<MCETemplate>)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
MCETemplateRegistry.h