How to use AssistiveTouch UI in iOS - objective-c

I'm now developing an app on iOS. With some reason, I want to use AssistiveTouch UI in my app. For example, there will display a button in my app like AssistiveTouch, if anyone press this button, four buttons will appear like AssistiveTouch, if anyone press one of there four buttons again, some action i set before will excuse.
Does apple support api about this? Or Is there any source code available?

You would have to reimplement this from scratch. There is no public API for either accessing the existing Assistive Touch feature (it has to be turned on by the user in the settings) or for creating a similar UI.

Related

UWP In-App Notifications (As opposed to Toast notifications)

On Android, toast notifications work differently to UWP. It simply shows a little black popup message over the top of the app. In UWP, toast notifications are indistinguishable from push notifications from the user perspective. Is there a standardized way in UWP to simply show a quick notification inside the app that will disappear after a few seconds and not interfere with the user's experience? I mean without it looking like the user has received a push notification?
This article doesn't seem to hint at anything like what I am talking about.
https://learn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-badges-notifications
The UWP Toolkit provides an InAppNotifications control for this.
http://www.uwpcommunitytoolkit.com/en/master/controls/InAppNotification/
In many cases, the Snackbar class supersedes Toast. While Toast is currently still supported, Snackbar is now the preferred way to display brief, transient messages to the user.
Take a look at Showing Pop-Up Messages to find out the most common use cases.
We ended up building something as part of our Xamarin UI library to handle this.
The code can be found here:
https://github.com/MelbourneDeveloper/Adapt.Presentation/blob/master/Adapt.Presentation.UWP/Adapt/Presentation/UWP/InAppNotification.xaml.cs
There is a sample in this repo:
https://github.com/MelbourneDeveloper/Adapt.Presentation.git
Note: the same is for Xamarin Forms, but if you crack the code open, you'll be able to figure out how to use this for any UWP app.

How do I notify users of new content available in tvOS apps from the home screen?

Push notifications have been left out of tvOS (understandably so) but the docs seem to contradict themselves in alerting users to the fact that there is something new available in your tvOS app.
Here it seems to say that you can add an app badge: https://developer.apple.com/library/prerelease/tvos/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/WhatAreRemoteNotif.html
Here it says they've been removed from UIKit: https://developer.apple.com/library/prerelease/tvos/releasenotes/General/tvOS90APIDiffs/Objective-C/UIKit.html
Removed UIApplication.applicationIconBadgeNumber
Assuming the badge approach is not supported in this release, does anyone know the best practice for alerting a user that there is new content in your app without the user taking an explicit action? ie focusing on the app and showing them something in TopShelf?
I encountered the same problem and dived into this. Probably your best way is to update the topshelf with latest items, which is my way to solve this for now. You can use network calls to update the topshelf with content from your backend.
This depends on the type of application. E.g. showing the latest top movies for a movies app.
You can trigger an update of the topshelf after your network call completed using the following code:
NSNotificationCenter.defaultCenter().postNotificationName(TVTopShelfItemsDidChangeNotification, object: nil)
Make sure to implement the TVTopShelfProvider which should be clear using the following documentation:
This protocol is adopted by the principal class of an app’s TV Services extension. Apps that implement this extension can provide dynamic content to the Top Shelf element rather than having the system use the static image submitted with the app. The topShelfStyle property specifies the interface style you want, and the topShelfItems property specifies the content items to display. Whenever you change the content provided by the extension, post a TVTopShelfItemsDidChangeNotification notification to prompt the system to reload your content.
Icon badges are removed for app icons, push notifications as well (except for silent push notifications).

WinRt WebView control handling navigation within the control

I have a Metro app using a WebView control. I'm using NavigateToString to load a html file which may contain hyperlinks. What I then want to do is detect when one of these hyperlinks is selected and, instead of allowing navigation within the WebView control, to launch IE and view the page there instead.
Is this possible within the WinRT constraints, and if so, how?
So far, I've tried capturing the WebView_LoadCompleted() event, but although it does fire at the right time, I can't see any details about the URI from the NavigationEventArgs.
Unfortunately this isn't possible directly because WebView does not include events like Navigating (which were present in Windows Phone).
Luckily Nick Randolph (brilliant Windows Phone and Windows 8 developer) has created a workaround using script events. He's got a great write up on his blog:
http://nicksnettravels.builttoroam.com/post/2012/04/21/Limitations-of-the-WebView-in-Windows-8-Metro-Apps.aspx

Is it possible to enable or disable VoiceOver within an iOS app?

I would like to be able to turn VoiceOver on or off within my iOS app. The reason for this is I am trying to help a person with disabilities which render her unable to read messages (hence the need for VoiceOver), and who is also unable to triple click the home-button due to motor coordination problems. The way to the setting through Settings>General>Accessibility>VoiceOver>VoiceOver>Flipswitch is far too long and complicated.
Is it possible, without jailbreaking the device, to change this setting in an app? The app doesn't need to make it to the App Store, if that helps.
Alternatively, is it easy to do this with a jailbroken device?
Another approach may be to simulate the triple-click on the home-button that automatically turns on VoiceOver. Is there any way to do this?
Get the app aHomeIcon.
Open the app and tap URL.
Insert the url: prefs:root=General&path=ACCESSIBILITY
Tap 'Done'.
Insert a name to be shown below the icon.
Tap the export button at the bottom of the page. Safari opens.
Add a bookmark and select 'to home-screen'.
Now you can tap that icon and you are redirected to the accessibility part of the settings app.
See this link for reference.

Sencha Touch Passcode

Is there a control in Sencha Touch to show a passcode field like shown in picture below?
No theres no native component who does exactly this. But you can build it by yourself: its a form with 4 input fields and a dozen buttons. See documentation for more details: http://docs.sencha.com/touch/1-1/#!/api/Ext.form.FormPanel
No, you have to build and design this one completly by yourself.
Note: To get rid of the browser controls, you have to enforce that the application is running form the homescreen. You can control (with some Javascript) if the application is running MobileSafari or as a "Web App". (see: http://cubiq.org/add-to-home-screen as an example of such an implementation)
But, however, I would not recommend using such a component. A) This can confuse people and B) Can intent users to type in their regular passcode. As a developer I wouldn't be comfortable with that situation.