Class: Redbreast::TemplateGenerator::Image::ObjC
- Includes:
- ERB::Util
- Defined in:
- lib/redbreast/template_generators/images/objc_images_template_generator.rb
Overview
Used for creating images in objective-c.
Instance Method Summary collapse
Methods inherited from ObjC
Instance Method Details
#h_template ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/redbreast/template_generators/images/objc_images_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', 'UIImage', app_name) %> <%= generate_h_file_objc(names: asset_names, variable: '+ (UIColor *)%s;\n')%> @end TEMPLATE end |
#m_template ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/redbreast/template_generators/images/objc_images_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', 'UIImage', app_name) %> <%= generate_m_file_objc(names: asset_names, variable_declaration: '+ (UIImage *)%s\n{', variable_implementation: '\n\treturn [UIColor imageNamed:@"%s" inBundle:%s compatibleWithTraitCollection:nil];\n}\n', bundle_name: bundle) %> @end TEMPLATE end |