Is it possible to customize application icon badge: Xcode? - ios

This may be a foolish question. But I'm asking it because of my curiosity. Is there is any possible way to customize an iOS application icon badge image(as below:)..?
Thanks in advance...

Not possible at all. You have to use Default. After the app launch you can show custom badge icon of the UITabbar.
All the best !!!

If you mean the badge number that can be shown on an app icon, in white text over a red circle, then no, it cannot be set to a custom image. You can only control the number that is shown. It is set using the -[UIApplication setApplicationIconBadgeNumber:] method, i.e., the applicationIconBadgeNumber property on UIApplication:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:99];

I have a possible solution, instead of using the OS to add a badge, what if you programmatically replace the app icon with a version that has the badge built into it.
You can use libraries such as:
https://github.com/skb1129/react-native-change-icon
The only question is, does anyone know if Apple would have any objections?

Related

iOS Swift Notifications action background color

After some search i couldn't find information on how to change notification button background colors. Is this possible to do with Swift in iOS?
Thanks :)
The only thing you can do is to set it to red color. You can achieve it if you set actionButton.destructive equal to true

Change iOS System Keyboard Background Image and Buttons Image

Rather than creating a custom keyboard...how can I change the ios keyboard background image and get reference of the keyboard button or just the keyboard view programatically?
I do not want to replicate the whole ios keyboard, just tweak the keyboard here and there.
Solution Update:
You cannot update only the background or the buttons of the iOS System Keyboard! This is dues to the reason that Apple has limited the access to the Keyboard API. The most you can do is change the keyboard background color i.e. dark or light.
If you need to change the background to an image like me, you need to extend the ios keyboard i.e. make your own custom keyboard!
Please check below for accepted answer!
Hope this helps!
You can do something like this,
myTextField.keyboardType = UIKeyboardTypeDecimalPad; // many other options
myTextField.keyboardAppearance = UIKeyboardAppearanceDark; //many other options
If you want totally customize keyboard then refer this tutorial.
Hope this will help :)
For dark background you can use
mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
For more customisation follow this link:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInputTraits_Protocol/index.html

Is there a way to check if "increase contrast" is enabled in the accessibility settings in iOS?

On iOS 7.0.3 turning on increased contrast mode removes the blur effects you'd normally see in the nav bar if you're using a bar tint color with an alpha less than 1.0, which makes the nav bar seem much more transparent than it is with the default settings.
Is there a way to programmatically check to see if this setting is enabled? While UIAccessibility has a ton of other functions like UIAccessibilityIsInvertColorsEnabled(), I can't find anything related to this setting specifically.
As of iOS 8 there is a way to check:
UIKIT_EXTERN BOOL UIAccessibilityDarkerSystemColorsEnabled() NS_AVAILABLE_IOS(8_0);
as of modern iOS:
UIAccessibility.isDarkerSystemColorsEnabled
Apparently there's no public API for checking whether that option is on.
According to the UIKit Function Reference, the only checks you can perform are the following
UIAccessibilityPostNotification
UIAccessibilityIsVoiceOverRunning
UIAccessibilityIsClosedCaptioningEnabled
UIAccessibilityRequestGuidedAccessSession
UIAccessibilityIsGuidedAccessEnabled
UIAccessibilityIsInvertColorsEnabled
UIAccessibilityIsMonoAudioEnabled
UIAccessibilityZoomFocusChanged
UIAccessibilityRegisterGestureConflictWithZoom
UIAccessibilityConvertFrameToScreenCoordinates
UIAccessibilityConvertPathToScreenCoordinates
For iOS 13 and above we can use accessibilityContrast
Documentation
Use this trait to determine whether the user requested a high contrast
between foreground and background content. The user sets the contrast
level in the Accessibility area in Settings.
Apple doc link

Change a badge icon image in ios 4?[Close]

Question
How can I change the badge icon image in ios4? I would like it to look like this:
You can't. iOS puts the new ribbon there. The developer cannot control that.

Is there a way to programmatically configure the notification display setting for an ios app?

I tested it on two iphones : on the first the setting was set to 'none' and on the second it was set to 'banner' (seems weird). I would like to know if there's a way to explicitly code that in the app? Thanks :)
Now I know there's no way to do that.

Resources