mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-05-23 11:42:16 +00:00
Update AppIconOptionsController.m
This commit is contained in:
parent
05a0763557
commit
9d0a4330dc
1 changed files with 18 additions and 10 deletions
|
|
@ -85,10 +85,13 @@ static NSString *BundlePath(void) {
|
|||
if ([fm fileExistsAtPath:full isDirectory:&entryIsDir]) {
|
||||
if (entryIsDir) {
|
||||
[iconNames addObject:entry];
|
||||
} else if ([[entry.pathExtension.lowercaseString ?: @"" ] isEqualToString:@"png"]) {
|
||||
NSString *name = [entry stringByDeletingPathExtension];
|
||||
if (name.length > 0) {
|
||||
[iconNames addObject:name];
|
||||
} else {
|
||||
NSString *ext = entry.pathExtension.lowercaseString;
|
||||
if ([ext isEqualToString:@"png"]) {
|
||||
NSString *name = [entry stringByDeletingPathExtension];
|
||||
if (name.length > 0) {
|
||||
[iconNames addObject:name];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -107,10 +110,13 @@ static NSString *BundlePath(void) {
|
|||
if ([fm fileExistsAtPath:full isDirectory:&isDir]) {
|
||||
if (isDir) {
|
||||
[iconNames addObject:entry];
|
||||
} else if ([[entry.pathExtension.lowercaseString ?: @""] isEqualToString:@"png"]) {
|
||||
NSString *name = [entry stringByDeletingPathExtension];
|
||||
if (name.length > 0) {
|
||||
[iconNames addObject:name];
|
||||
} else {
|
||||
NSString *ext = entry.pathExtension.lowercaseString;
|
||||
if ([ext isEqualToString:@"png"]) {
|
||||
NSString *name = [entry stringByDeletingPathExtension];
|
||||
if (name.length > 0) {
|
||||
[iconNames addObject:name];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -193,7 +199,8 @@ static NSString *BundlePath(void) {
|
|||
if (!found) {
|
||||
NSArray *files = [fm contentsOfDirectoryAtPath:dir error:nil];
|
||||
for (NSString *file in files) {
|
||||
if ([[file.pathExtension.lowercaseString ?: @""] isEqualToString:@"png"]) {
|
||||
NSString *ext = file.pathExtension.lowercaseString;
|
||||
if ([ext isEqualToString:@"png"]) {
|
||||
NSString *path = [dir stringByAppendingPathComponent:file];
|
||||
preview = [UIImage imageWithContentsOfFile:path];
|
||||
found = YES;
|
||||
|
|
@ -225,7 +232,8 @@ static NSString *BundlePath(void) {
|
|||
if (!found) {
|
||||
NSArray *files = [fm contentsOfDirectoryAtPath:dir error:nil];
|
||||
for (NSString *file in files) {
|
||||
if ([[file.pathExtension.lowercaseString ?: @""] isEqualToString:@"png"]) {
|
||||
NSString *ext = file.pathExtension.lowercaseString;
|
||||
if ([ext isEqualToString:@"png"]) {
|
||||
NSString *path = [dir stringByAppendingPathComponent:file];
|
||||
preview = [UIImage imageWithContentsOfFile:path];
|
||||
found = YES;
|
||||
|
|
|
|||
Loading…
Reference in a new issue