Can the iOS8 InvertColors function be called in an apps code? - ios

iOS now has a setting in General, accessibility, "Invert Colors". It basically provides a negative image of an app's colors.
I have an app that is mostly dark background elements with light icons and buttons. It would be great to have a setting inside my app to call that invert colors function as needed for specific users.
Any ideas if that setting is exposed? Thanks much!

In general you have no access to the user's Settings, and this is no exception. Your app can't alter general settings on the user's device; that would be a terrible security hole!
However, nothing stops you from putting up an alert or other dialog suggesting that the user might like to do this.
Alternatively, though, what I would recommend is themes. Basically give the user a preference within the app, so that the user can choose or alter the colors of things. Then, in response to the user's setting, you use the appearance proxy to change all the colors thematically throughout the app. There was a good WWDC video either in 2013 or 2012, I think, on this very idea.

Related

For iOS, is it possible to have a Toast message that can display on top of system app Settings?

I have a button in my app that brings up the system app settings UI. Instructions are given around the button.
I want to provide further instructions to the user via a toast message after the settings page shows up so they know exactly what to do. It's not a super intuitive setting, related to notification style, and such instructions would be a lot clearer when the user is actually on the settings page.
In Android, this is easily done via toast.makeText().show(). The resulting toast would have no problem going on top of the system settings UI.
In iOS though, I've looked up several guides, mostly using the UIView animation. The problem is, the resulting toast window seems to only work inside the app itself. It cannot go on top of the system settings UI.
Is what I want to achieve technically possible in iOS?
No. You are sandboxed; Settings is a different app and you cannot impose anything on to its interface.

iPad detect if the user has Dark Mode enabled, without supporting Dark Mode

I'm working on an iPad app. I would like to know if a user has Dark Mode turned on, without actually supporting Dark Mode.
When I have my iPad in Dark Mode, and I ask the O.S for the userInterfaceStyle it always returns 1 (Light Mode).
In my info.plist I've set the User Interface Style to Light. When I remove this value, asking the O.S for the userInterfaceStyle, I get the correct value.
I understand that we should "just support it", however I need evidence that user's are actually using it before I can allocate the resources necessary to complete the task.
When you set the info.plist key, the style will be overridden on the system level and your app will never receive the user's setting.
Alternatively, you could remove the plist key and instead set overrideUserInterfaceStyle on your main window. All subviews of that window will render in light appearance, but you should be able to check for the system style.
By the way, I think a lot of users are using Dark Mode by now, so it's probably worth the effort.

iOS Accessibility – Detect if Colour Filters is on?

In iOS, you can set Colour Filters which is helpful for Colour Blind users. Is it possible or any way we can know if this is turned on / off?
The documentation does not mention such a thing and there is no UIAccessibility boolean that returns whether color filters are enabled (unlike for inverted colors), so it's safe to assume that there isn't a public API to detect this from an app.
However, this isn't necessarily a problem. Use color schemes in your app in a way that won't distract or confuse users with visual disabilities in the first place.

iPhone's Tone Color Change from an App

Recently, I have installed Twilight on my Android phone. Apparently is adds a color tone effect on the screen. Here are two screen shots taken from PlayStore.
Now my question is that is there a way to develop similar system display tone color set up application in iOS?
It is not possible as Apple restrict the developers to edit home screen. There are very limited features that we can access like Calendar, Gallery, etc. The above screenshot your are showing is related to Widget but there are no Widget concept in iOS.
Yes, it is certainly possible and I use an app that does this.
Have a look at https://github.com/anthonya1999/GoodNight, It's even open sourced.
However an app like this will most likely be denied from the App Store, but never the less it is possible.
Night Shift is supposed to bring something like this in iOS 9.3, though not to that extent.
I don't know of any public API that would allow an application to change that kind of parameter system-wise, though. Maybe in the Accessibility framework, but that would restrict it to app-wise, not system-wise.

Ios default icon for open view from list

In every ios app you can have a list that contains elements with subelements.
Tapping on the element will open a new page and you can usually press back to return.
This is indicated with a grey ">" symbol on the right.
Is this symbol downloadable somewhere? I know i can just type a > but it doesn't look exactly like the default icon used by ios.
I'm using Xamarin dialog and a standard RootElement embedded as a list item looks exactly like the default ios but i need to customize it with an icon placed left of the text(which is no problem except that i now lose the default > icon).
Googling for ios system icons, ios default icons and ios sdk did not yield the wanted result. I'm hoping that these icons are somewhere embedded on the device.
I hope you guys can help me out, thanks !
As far as I know there is no way to access a UIImage instance of the chevron during run time. Most likely there is private API for this, but I am not aware of it, and since it's private you are not allowed to use it anyway.
You could probably instantiate a cell that has the disclosure indicator as accessoryType and walk the view hierarchy to find it. But that will break easily, so don't do it.
The best way is to add an image and update it with every new iOS release.
There's the iOS Artwork Extractor which basically gets you every piece of artwork that is used in iOS.
The artwork you are looking for should be named UITableNext. (at least that's the name in iOS6, I don't have an extracted archive of iOS7 yet)
Strictly speaking you are violating Apples rules and their copyright if you use their artwork without Apples written consent.
As far as I know this has never been enforced, and lots of people do it, but it's good to keep it in mind.

Resources