Sha256: a38cc71fabc91ebddea587ffa2aec5acfc20fc4dbb120b20a3f2045c5364063c
Contents?: true
Size: 1.62 KB
Versions: 1
Compression:
Stored size: 1.62 KB
Contents
module Ovaltine class StoryboardTemplates VIEW_CONTROLLER_DEFINITION_TEMPLATE='+(UIViewController *)instantiate{IDENTIFIER};' VIEW_CONTROLLER_IMPLEMENTATION_TEMPLATE='+(UIViewController *)instantiate{CAPITALIZED_IDENTIFIER} { return [[self storyboard] instantiateViewControllerWithIdentifier:{IDENTIFIER}]; }' STATIC_IDENTIFIER_TEMPLATE='static NSString *const {IDENTIFIER_CONSTANT_NAME} = @"{IDENTIFIER}";' SEGUE_DEFINITION_TEMPLATE='+(NSString *){IDENTIFIER};' SEGUE_IMPLEMENTATION_TEMPLATE='+(NSString *){IDENTIFIER} { return {IDENTIFIER_CONSTANT_NAME}; }' REUSE_DEFINITION_TEMPLATE='+(NSString *){IDENTIFIER};' REUSE_IMPLEMENTATION_TEMPLATE='+(NSString *){IDENTIFIER} { return {IDENTIFIER_CONSTANT_NAME}; }' STORYBOARD_IMPLEMENTATION_TEMPLATE='[UIStoryboard storyboardWithName:{IDENTIFIER_CONSTANT_NAME} bundle:[NSBundle mainBundle]]' STORYBOARD_SECTION_TITLE_TEMPLATE="/** {TITLE} */" HEADER_TEMPLATE='''// // {FILENAME} // {COPYRIGHT} // Generated by Ovaltine - http://github.com/kattrali/ovaltine #import <Foundation/Foundation.h> @interface {CLASS_NAME} : NSObject +(UIStoryboard *)storyboard; {REUSE_IDENTIFIERS} {SEGUE_IDENTIFIERS} {VIEW_CONTROLLERS} @end ''' IMPLEMENTATION_TEMPLATE='''// // {FILENAME} // {COPYRIGHT} // Generated by Ovaltine - http://github.com/kattrali/ovaltine #import <UIKit/UIKit.h> #import "{CLASS_NAME}.h" static UIStoryboard *_storyboard = nil; {STATIC_VARIABLES} @implementation {CLASS_NAME} +(UIStoryboard *)storyboard { return _storyboard ?: (_storyboard = {STORYBOARD}); } {REUSE_IDENTIFIERS} {SEGUE_IDENTIFIERS} {VIEW_CONTROLLERS} @end ''' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ovaltine-1.0.6 | lib/ovaltine/objc/storyboard_templates.rb |