Sha256: ac3071881b6f47a8b1a1fe0ae112fc395ef8dd5315fa81c2046ef23d67bc6b92

Contents?: true

Size: 794 Bytes

Versions: 3

Compression:

Stored size: 794 Bytes

Contents

//
//  <%= @prefixed_module %>Bundle.m
//  <%= @project %>
//
//  Created by <%= @author %> on <%= @date %>.
//
//

#import "<%= @prefixed_module %>Bundle.h"

@implementation <%= @prefixed_module %>Bundle

+ (UINib *)bundlerNib:(NSString *)nibName {
    return  [UINib nibWithNibName:nibName bundle:[self currentBundle]];
}

+ (NSBundle *)currentBundle {
    NSString *bundleName = @"<%= @project %>";
    NSURL *associateBundleURL = [[NSBundle mainBundle] URLForResource:bundleName withExtension:@"bundle"];
    if (!associateBundleURL) {
        NSBundle *subBundle = [NSBundle bundleForClass:self];
        associateBundleURL = [subBundle URLForResource:bundleName withExtension:@"bundle"];
    }
    NSBundle *bundle = [NSBundle bundleWithURL:associateBundleURL];
    return bundle;
}

@end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mt_tool-0.1.5 lib/mt_tool/module/template/objc/Bundle.m
mt_tool-0.1.4 lib/mt_tool/module/template/objc/Bundle.m
mt_tool-0.1.3 lib/mt_tool/template/objc/Bundle.m