Sha256: 96b0faadf70c413ff1b41c383f9755333339f3c04ee66d6cde83a1a1a3e12759
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
require_relative '../objc_template_generator' module Redbreast module TemplateGenerator module Image class ObjC < Redbreast::TemplateGenerator::ObjC include ERB::Util def h_template() <<-TEMPLATE #import <UIKit/UIKit.h> //THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND @interface UIImage (<%= File.basename(bundle[:outputSourcePath]) %>) <%- image_names.each do |name| -%> + (instancetype)<%= clean_variable_name(name) %>; <%- end -%> @end TEMPLATE end def m_template() <<-TEMPLATE #import <UIKit/UIKit.h> //THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND @implementation UIImage (<%= File.basename(bundle[:outputSourcePath]) %>) <%- image_names.each do |name| -%> +(instancetype)<%= clean_variable_name(name) %> { [UIImage imageNamed:@"<%= name %>" inBundle:<%= bundle[:reference] %> compatibleWithTraitCollection:nil]; } <%- end -%> @end TEMPLATE end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems