Is there a way to identify programmatically if the user has the "zoom" accessibility feature toggled on?
I'm referring to the feature where you can:
Double-tap three fingers to toggle zoom on off
Drag with three finger to change scroll area of the screen.
Use two fingers to scroll on current area of the screen.
When zoom is toggle on and screen is zoomed there is no change in UIScreen.main.scale
Something similar to UAZoomEnabled from the MacOs UniversalAccess.
Related
For the UI Test case I need to "zoom out" in the map view. When using pinch zoom out code it only moves map to the left.
let app = XCUIApplication()
app.maps.element.pinch(withScale: 0.9, velocity: -0.5)
Dose someone knows how to achieve "zoom out" functionality in the UI Testing?
I want to notice that "zoom in" works fine.
The problem is that one finger of the simulated pinch gesture is falling on the status bar, so only the other finger is registered.
You can solve the problem in your example project by adding the following to ViewController.swift:
override var prefersStatusBarHidden: Bool {
return true
}
When zooming out, the UI test system seems to simulate a pinch from the very top left and bottom right of the view, constrained to the edges of the screen. This doesn't seem to take the status bar into account, and so the top-left touch falls on the status bar and is ignored, and only the bottom-right touch is registered by the view, causing the pinch to become instead a drag up and left. This isn't just with maps, it seems to be an issue with all scroll views.
If you do want to display the status bar on top of the view, you may need to figure out another way to constrain your pinch to not fall on the status bar. In my case, I was fine simply removing the status bar.
is there any way to implement a draggable TChart which pans/ moves on click and drag? At the moment it is zooming to the area selected; can this be changed to work like you'd expect on a touch screen? Thanks, Toby
By default, zooming is active and set to be used drawing a zooming rectangle with the left mouse button. And the scroll is set to be used dragging the chart with the right mouse button.
To change this behaviour, you can disable the zooming and change the scroll button:
Chart1.Zoom.Allow:=false;
Chart1.ScrollMouseButton:=mbLeft;
I am creating an iOS app using storyboard to plot some locations in a map. While running it, in the simulator, whatever button(mouse button) I click, the view just zooms in. How can I zoom out. Whether I should place a scroll bar in the view, or is there any other possibilities.
Holding Alt on the keyboard will allow you to make a pinch gesture.
I have a view on the iPad that I'm adding an MKMapView to that is say half the height of the full screen. However, when I try to pinch out on the iOS Simulator it doesn't work since the to nubs fill the entire iPad view on the simulator.
And so, with the map view half the screen and I press the Option key on the keyboard I cannot grab the map to pinch out.
Anyone know how to handle this?
You can move the two gray circles that represent your fingers around the screen by holding Option and Shift and moving the mouse.
Try double tapping with the option key pressed. On the iPhone this causes the MKMapView to zoom out.
Only pressing the alt key made the two gray dots representing your fingers appear for me...
2022 UPDATE
To zoom in
alt/option + pinch in using mouse
Alternate option: control + click (This will place a gray circle on the map, now you can click and drag your mouse to zoom in and out.
If you want to disable it, just click on the circle again)
To zoom out
alt/option + pinch out using mouse
To get flat view of the map
Zoom to an area in map then Shift + alt/option + click and drag mouse
Updated Solution:
Holding Option and Command gives you 2 finger vectors that spread out and in. Holding the mouse button down on the way in will pinch in and visa versa for spreading out.
Double click, hold, drag finger.
You can use Option (Alt) button or combination of Option button and command button along with mouse movement to zoom in and zoom out a map or an image.
There is another way to do this:
1- While holding the control key click with the mouse on where you would like to center the pinch gesture. This will cause one gray dot to remain on the screen. (Once its there, you can let go of the control key)
2- Now you can use the mouse to click and drag around the gray dot you specified in step 1
Once you are done you can remove the gray dot by tapping on it
For Zooming in double tap using mouse.
For Zooming out press and hold on option/alt key this will give you 2 grey circles which represents your 2 fingers and drag your mouse up.
To Zoom in drag your mouse down with option key pressed(or double tap on mouse)
The Gilt iPhone app uses UIScrollView and UIPageControl to page through their content, but I was wondering how they implement their horizontal scrolling menu at the top.
Is it a UITableView rotated -90 degrees?
How does it know that the center item should be set as selected?
Is it a UIScrollView with buttons and maybe you check if the button is in a certain region, it selects that button and uses the scrollToRect method?
Does anybody have any experience with this?