I want to swipe a screen to the left. But I have no label or button whose display-label does not change or is recognizeable during recording. So I cannot find a point to grab and swipe the screen.
Is there a possibility to swipe a certain screen-coordinate?
Thanks in advance!
You can swipe directly on the app, and even the window.
let app = XCUIApplication()
app.swipeLeft()
app.windows.element.swipeLeft()
Just solved it by recording a tap on a random screen location. This gave me three lines of app.childrenMatchingType(.Window).elmentBoundByIndex(0).....element.childrenMatchingType(.Other).tap()
Somehow weird. But I changed tap() with swipeLeft() and it worked out.
Related
I was wondering, I'm currently using a slide in and out page transition when the user presses a Next of Previous button on the appbar.
( concept: going through a set of articles inside a selected category )
This all looks great, I'm also able add the drag / flick gesture listeners to trigger this page transition... so no problems there.
But now I wanted to add the final part, when the user starts the drag / flick gesture, show this visually so that the page follows the gesture and 'slides' out of frame.
But how to do this? An example would be great :)
But there is also a small extra thing, I don't want the user to always do a full drag... so if we are over 2/3 of the screen, auto start the page transition IF the gesture stops ( so the user lifts up his finger )
So I would like to create a nice reading experience that shows the gesture visualy and performs the page transition...
You can check the following link: https://stackoverflow.com/a/9915016/1565574
In the ManipulationCompleted you'll be able to detect the GestureType and take an action there.
And I found that link: https://stackoverflow.com/a/4342558/1565574 (using the GestureService)
I first started with the DragFlickBehavior from #LocalJoost and it actually worked great!
But in the end I switched to a headerless pivot! Works also great!
So anyway, as normal, my app is working pretty awesome in iOS5.
Then came iOS6 with new Maps app, and it no longer function as it supposed to. (insert Roll Eyes icon here)
I have a MapView with the following user interactions:
User can zoom in/out by pinching.
User can double tap to drop a pin.
This is no longer the case with iOS6, No.2 does not work anymore.
It seems the new MapView no longer detects double tapping directly.
If I disable zooming (in IB) then it works.
So, how can I make this work?
Or perhaps it is better to change the operation from "double tap" to "long tap"?
Any suggestions or how to make it work while enabling zoom
is appreciated.
Thanks yall.
What the heck.
Nobody answers this, so I'm going to answer for myself.
What I did is a simple hack.
implement the touchesBegan delegate in the same viewcontroller.
in there, detect single touch, and if detected a single touch, disable the MapkitView zooming. Hence the TapGestureRecognizer implemented for the MapKitView will response.In this
case a double tap will response as I needed it to.
And when a 2 touches detected (two fingers on the screen), enable back the zooming of the MapkitView.
This works pretty ok.
Hope this helps other people who is facing the same problem with iOS6 Maps app.
Surprisingly, this still works ok for Google Maps (prior iOS6).
Thanks.
To make my scroll view scroll, i need to check the box "bounce vertically". But when i make it, while scrolling the page. The page automatically scrolls itself back to first state if i dont keep my finger holded on the screen. Please help me.
uncheck the box bounce vertically and check the box bounces. on the scroll view section of the IB right on the top check the first three boxes. show vertical... show horizontal.... scrolling enabled.
that should do the trick. let me know if this works.
adrian
Problem
Here is the example, test it on iOS safari please.
In this example, when user touches one anchor, the background of anchor at the touch position will turn gray.
When user scrolls the element, and immediately touches the element to make it stop before it stops by self. The wrong element will turn gray. In fact, the anchor at the touch position before scrolling will turn gray.
Possible Solutions
The best solution is getting the correct anchor at the touch position when touching-stop the scrolling element.
If the correct anchor cannot be gotten, stop gray-turning when touch-stop the scrolling element is accepted. But how can i know whether user is touching-stop the scrolling element or simply tapping? In other words, how can I know whether the element is scrolling?
run into this issue too. Scrolling List of search results, tap one and get the details. This would only work when the scrolling hat absolutely stopped. As long as there was still some movement in the list, the tap would pick the wrong item.
simple solution: disable the native scrolling, take out
-webkit-overflow-scrolling: touch;
It does not scroll that nicely anymore but the tap does work now.
At this point you can look into libraries that bring back the nice scrolling effects, if you really need it.
I am new to Blackberry..I am developing an application which contain the home screen having a button on it. When clicked on it, it is changing to new screen for that I used UiApplication.getUiApplication().pushScreen(new NewScreen()); in the fieldchangedListener method.
In the newscreen I added a verticalFieldManager and add some images and a button.What I want is when I click on this button it should takes to the homescreen.
I implemented the second screen functionality in NewScreen class which is in the main class.
Please let me know any suggestions.
Thanks
Koushik
i think you want to go back to the previous screen.
try this.
Screen currentScreen = UiApplication.getUiApplication().getActiveScreen();
UiApplication.getUiApplication().popScreen(currentScreen);
Write this a code snippet, then I can help you.
Perhaps You need to overload methods onClose, onSave or etc.
I can use the command close(); in the button event, thus you'll close the second Screen and return to the first one.