28 lines
673 B
Objective-C
28 lines
673 B
Objective-C
//
|
|
// AMapNavCommonUtil.m
|
|
// Pods
|
|
//
|
|
// Created by admin on 2026/2/11.
|
|
//
|
|
|
|
#import "AMapNavCommonUtil.h"
|
|
|
|
@implementation AMapNavCommonUtil
|
|
|
|
|
|
#pragma mark - 获取图片
|
|
+(UIImage *)imageWithName:(NSString *)name {
|
|
NSURL * url = [[NSBundle mainBundle] URLForResource:@"AMapNavIOSSDK" withExtension:@"bundle"];
|
|
NSBundle *containnerBundle = [NSBundle bundleWithURL:url];
|
|
|
|
NSString * path = [containnerBundle pathForResource:[NSString stringWithFormat:@"%@@2x.png" , name] ofType:nil];
|
|
|
|
UIImage * arrowImage = [[UIImage imageWithContentsOfFile:path] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
|
return arrowImage;
|
|
}
|
|
|
|
|
|
|
|
@end
|