I'm using this new feature and when the change is made with an active application, a notification dialog is displayed saying that icon has been modified. How to disable this dialog ?
To find it, scroll up until you see Today and keep scrolling up in a Journal project until the icons' screen shows up. From there, you can select any icon that's available to you. The more snippets you add, the more icons you'll unlock!
To change an icon to one you downloaded, tap and hold an empty area of the screen again, select Themes, tap Icons, tap the menu, and then select My Stuff. Choose Icons, select the icons you want to use, and tap Apply.
If you don't mind making use of private method, you can try the following code.
- (void)lc_setAlternateIconName:(NSString*)iconName
{
//anti apple private method call analyse
if ([[UIApplication sharedApplication] respondsToSelector:@selector(supportsAlternateIcons)] &&
[[UIApplication sharedApplication] supportsAlternateIcons])
{
NSMutableString *selectorString = [[NSMutableString alloc] initWithCapacity:40];
[selectorString appendString:@"_setAlternate"];
[selectorString appendString:@"IconName:"];
[selectorString appendString:@"completionHandler:"];
SEL selector = NSSelectorFromString(selectorString);
IMP imp = [[UIApplication sharedApplication] methodForSelector:selector];
void (*func)(id, SEL, id, id) = (void *)imp;
if (func)
{
func([UIApplication sharedApplication], selector, iconName, ^(NSError * _Nullable error) {});
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With