Sha256: 0e69a1fc2d0178e5386a3d7b2de5c6510c0c0a987f90d09dd6ae46cf3c317034
Contents?: true
Size: 1.59 KB
Versions: 2
Compression:
Stored size: 1.59 KB
Contents
module Ovaltine class StoryboardTemplates VIEW_CONTROLLER_DEFINITION_TEMPLATE='+(id)instantiate{IDENTIFIER};' VIEW_CONTROLLER_IMPLEMENTATION_TEMPLATE='+(id)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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ovaltine-1.1.1 | lib/ovaltine/objc/storyboard_templates.rb |
ovaltine-1.1.0 | lib/ovaltine/objc/storyboard_templates.rb |