Change function name

This commit is contained in:
Spotlight 2021-11-15 02:38:00 -06:00
parent 5a5dfb7bb2
commit ade79f4a83
Signed by: spotlight
GPG key ID: 874AA355B3209BDC
2 changed files with 5 additions and 6 deletions

View file

@ -1,5 +1,5 @@
@import UIKit; @import UIKit;
@interface SPRootViewController : UIViewController @interface SPRootViewController : UIViewController
- (CGImageRef)getImage:(NSString *)named; - (CGImageRef)getImageNamed:(NSString *)filename;
@end @end

View file

@ -6,7 +6,6 @@
#import "CAStateController.h" #import "CAStateController.h"
@interface SPRootViewController () @interface SPRootViewController ()
- (CGImageRef)getImage:(NSString *)named;
@end @end
@implementation SPRootViewController @implementation SPRootViewController
@ -52,9 +51,9 @@
// Have our wonderful, extremely 2011/2012-esque metal design. // Have our wonderful, extremely 2011/2012-esque metal design.
// It's local! There's no reason not to. // It's local! There's no reason not to.
[[package publishedObjectWithName:@"shredderFront"] [[package publishedObjectWithName:@"shredderFront"]
setContents:(id)[self getImage:@"ShredderMetal"]]; setContents:(id)[self getImageNamed:@"ShredderMetal"]];
[[package publishedObjectWithName:@"shredderBack"] [[package publishedObjectWithName:@"shredderBack"]
setContents:(id)[self getImage:@"ShredderMetal"]]; setContents:(id)[self getImageNamed:@"ShredderMetal"]];
// Set what we're shredding. // Set what we're shredding.
[[package publishedObjectWithName:@"cardFrontUnshredded"] [[package publishedObjectWithName:@"cardFrontUnshredded"]
@ -65,10 +64,10 @@
setContents:(id)[[UIColor blueColor] CGColor]]; setContents:(id)[[UIColor blueColor] CGColor]];
} }
- (CGImageRef)getImage:(NSString *)named { - (CGImageRef)getImageNamed:(NSString *)baseName {
NSBundle *passKitBundle = NSBundle *passKitBundle =
[NSBundle bundleForClass:NSClassFromString(@"PKPass")]; [NSBundle bundleForClass:NSClassFromString(@"PKPass")];
NSString *filename = [NSString stringWithFormat:@"%@@2x", named]; NSString *filename = [NSString stringWithFormat:@"%@@2x", baseName];
NSString *path = [passKitBundle pathForResource:filename ofType:@"png"]; NSString *path = [passKitBundle pathForResource:filename ofType:@"png"];
UIImage *image = [UIImage imageWithContentsOfFile:path]; UIImage *image = [UIImage imageWithContentsOfFile:path];