I have some graphical classes which support Voice Over for accessibility. Calculation of the accessibility elements can sometimes be expensive, so we only add the accessibility elements if Voice Over is running, by checking the value returned by the UIAccessibilityIsVoiceOverRunning() function and the UIAccessibilityVoiceOverStatusChanged notification, and this works fine.
However, if I want to debug my Voice Over accessibility elements on the Simulator using the Accessibility Inspector as explained here, I cannot do so because UIAccessibilityIsVoiceOverRunning() returns NO even when you have the Accessibility Inspector enabled.
Is there an equivalent of UIAccessibilityIsVoiceOverRunning() and UIAccessibilityVoiceOverStatusChanged for the Simulator's Accessibility Inspector?
I know I could conditionally disable the optimization test when compiling against the simulator, but if possible I would like to keep it, and only calculate the accessibility elements if the Accessibility Inspector is running.
I'm afraid detecting if the Accessibility Inspector is running on the Simulator is not currently possible.
Related
My project has several Picker controls with .pickerStyle(SegmentedPickerStyle()). Something in the project (or, perhaps, on my iPad) has evidently changed, and now all of the pickers "pop" when selected, rather than the selection highlight sliding to the new selection -- but only on the actual device. In the simulator, the selection slides as expected. Even a plain vanilla picker with code straight out of Hacking With Swift exhibits this behavior on my device, so it seems that the issue is somewhere that has global effect, rather than in the code for an individual picker itself. (That "vanilla" code, along with all my other Picker controls, look normal in the Simulator.)
Other UI elements animate normally on the device, so it isn't a blanket "turn off all animations" setting, but the various segmented pickers are all affected, even though they reside in different parts of the project. (And, yes, the project is way, way too big to post all of the code -- but "the code" works as expected in the simulator.)
What are the sorts of things -- in a project or in a device's settings -- that can globally cause all segmented Pickers in a project to stop animating (though only on the device itself)?
What I'm seeing on the iPad:
What I'm seeing on the Simulator (i.e. what I expect to see):
I recognized the simulator vs device distinction when I created a Simulator to exactly duplicate my iPad (Air gen 3, iOS 14.2), and the simulator shows the picker sliding (i.e. the bottom screen capture). But the device shows it popping (the top screencap). This behavior persists after deleting the app on the iPad, rebooting the iPad, and installing the app again. So perhaps the 'guilty' setting is on the device rather than in the project???
What settings, in the project or the device, could cause this change in behavior?
Possibly related:
Broken animations in iOS 14
Not SwiftUI, but device vs simulator discussion
Example of "OK on simulator, not OK on device" (though with different specific things going on)
Another "ran on simulator, not on device" issue... does the Picker use the same problematic Spring animation???
(( And yes, there are plenty of cases where the simulator performs poorly & the device performs well... that's understandable. This case is one where things are the other way around: what works on the simulator does NOT work as advertised on the device. ))
This is caused by the Reduce Motion setting on your physical device. This can be found under Settings -> Accessibility -> Motion.
When reduced motion is disabled, the segmented picker has a slide animation.
When reduced motion is enabled, the segmented picker does not have the slide animation.
I have used "aria-label" for a button . Voice over in Ipad Safari browser reads the text twice. What can be done to fix this? "aria-label" reads only once in MacBook voiceover safari browser.
Check accessibilityLabel and accessibilityHint, they may be the same.
After WWDC2019 Accessibility Inspector Tool was added (Xcode > Open Developer Tool > Accessibility Inspector).
(screenshot of Accessibility Inspector window)
I just started to develop IOS app and i come from Android.
In IOS I'm having problem to set the width and height of the View in my Layout.
How can i set in IOS the weight and hight of a View like in Android when I set "Wrap Content" or "Match Parent"?
In iOS apps development there is a feature of "Auto Layout" which is used for setting the dynamic behavior of controls based on device size, resolution and orientation changes.
You can set the anchor settings for your view or setup constraints in reference to other UI elements to setup the behavior of controls for resizing the controls at run time. Xcode's inbuilt IB tool provides rich interface for testing the UI on all different iOS devices and orientations.
https://developer.apple.com/library/prerelease/content/documentation/UserExperience/Conceptual/AutolayoutPG/index.html
I am using XCode 7 (Beta) to test multitasking, but I could not get a way to test with it.
I just want to make sure is there anyone like me, who facing the same issue.
You can test it.
Just run ios simulator iPad Air 2 (ios 9)( because only this device supports Split View) and swipe from right to left near of middle edge of the screen
To adopt Multi-Tasking in your app, just make sure all below points followed:
Require XCode 7 (Beta 4) and later for having look in to the simulator through choosing iPad Air 2 because only this device supports Split View.
Provide a LaunchScreen.storyboard file ( instead of a .png image file as we did in iOS 7 and earlier).
In your project’s Info.plist file, in the “Supported interface orientations (iPad)” array, declare support for all four device orientations.
If you must opt out of Slide Over and Split View, do so explicitly by adding the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES. You can do this in the property list editor or in the General > Deployment Info area in the target editor.
Select storyboard, click the File Inspector icon in the right side bar. check the box next to Use Size Classes.
Reference Link
To adopt Multi-Tasking in your app. apply the following points:
Support all orientation from the target's General section in settings.
In the General section too. remove the check next to Requires full screen if any.
Select storyboard, click the File Inspector icon in the right side bar. check the box next to Use Size Classes. Check out tutorials how to use size class to adjust your views according to the screen size assigned to your app.
Then, run the simulator. Do a small drag from the right. An arrow will
appear. do a strong drag from it towards the centre.
iOS 7 and later allows a user to specify text size in Settings/Display & Brightness/Text Size. I don't see, or have yet to discover, how to change this in the iOS 7/8 Sim to test my app. Is it possible? If so, how/where is it done?
Thank you
In the simulator, go into settings (Choose "Home" on the hardware menu). Then General->Accessibility->Larger text. You also should slide the switch at the top to "Larger Accessibility Sizes". You'll then get a slider to adjust the text size.
Hope this helps.
Xcode 9.0 onwards
You can resize font of simulator as -
Xcode ► Open developer tool ► Open accessibility inspector
Select simulator from dropdown after that click setting(Gear) icon.
If you prefer an automatic approach to set this, see this question:
How to test Dynamic Type (larger font sizes) in iOS Simulator
The Accessibility Inspector (Xcode/Open Developer Tools/Accessibility Inspector in Xcode 8) as mentioned here is a great tool for testing Dynamic Fonts and accessibility in general. The WWDC 2016 video on is is well worth a watch.