Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart@emeel.net>
15 lines
426 B
Objective-C
15 lines
426 B
Objective-C
#import "NSURL+MLNAdditions.h"
|
||
|
||
@implementation NSURL (MLNAdditions)
|
||
|
||
- (nullable NSURL *)mgl_URLByStandardizingScheme {
|
||
if (!self.scheme) {
|
||
// Relative file URL, already escaped (in order to create the NSURL).
|
||
// Assume a relative path into the application’s resource folder.
|
||
return [NSURL URLWithString:[@"asset://" stringByAppendingString:self.absoluteString]];
|
||
}
|
||
return self;
|
||
}
|
||
|
||
@end
|