class Redbreast::TemplateGenerator::Color::ObjC
Used for creating colors in objective-c.
Public Instance Methods
h_template()
click to toggle source
# File lib/redbreast/template_generators/colors/objc_colors_template_generator.rb, line 9 def h_template <<~TEMPLATE #import <UIKit/UIKit.h> //THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND <%= generate_category('interface', 'UIColor', app_name) %> <%= generate_h_file_objc(names: asset_names, variable: '+ (UIColor *)%s;\n')%> @end TEMPLATE end
m_template()
click to toggle source
# File lib/redbreast/template_generators/colors/objc_colors_template_generator.rb, line 21 def m_template <<~TEMPLATE #import <UIKit/UIKit.h> //THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND <%= generate_category('implementation', 'UIColor', app_name) %> <%= generate_m_file_objc(names: asset_names, variable_declaration: '+ (UIColor *)%s\n{', variable_implementation: '\n\treturn [UIColor colorNamed:@"%s" inBundle:%s compatibleWithTraitCollection:nil];\n}\n', bundle_name: bundle) %> @end TEMPLATE end