I'm working on a very old iOS project that is using XLForm. I have to support a dynamic screen flow such as this attached
As XLForms is no longer on active development, I thought of asking the question here.
I've tried using XLFormOptionsObject and using a formSegueIdentifier to fully go custom but has not been that much helpful. If anyone has experience on a similar type of implementation using XLForms, any advice is really appreciated.
Side question;
I can intercept the Screen's C selection on Screen B using formRowDescriptorValueHasChanged, but how do I then manually pass that back to Screen A to update it's value?
Screen A
- Select Option > (tap pushes to Screen B)
Screen B
- Option 1 (tap selected option 1, pops and updates screen A row value)
- Option 2 (Same as option 1)
- Grouped Options > (tap goes to screen C)
- Option 3 (Same as option 1)
...
Screen C
- Option 1 from Grouped options (tap selects option 1, pops Screen C & B to go to A and updates screen A's row value)
- Option 2 from Grouped options (same as above)
...
Related
I am learning mobile automation and I came across a scenario some thing like this
Launch chrome app in iOS
Load https://www.google.com
Hold/Press and pull down banner web element on the web page which will display some overlay with three options 'New tab, Reload & Close tab' (note: overlay will lost on releasing the banner web element)
Tap on the new tab button
So far I have written below script in python
def Test(self, driver_provider):
single_tap = appium.webdriver.common.touch_action.TouchAction(driver_provider.driver)
element = driver_provider.driver.find_element_by_accessibility_id('NTPHomeFakeOmniboxAccessibilityID')
single_tap.tap(element=element).perform()
element.send_keys('https://www.google.com')
single_tap.tap(element=driver_provider.driver.find_element_by_accessibility_id('Go')).perform()
time.sleep(1)
#Press banner and pull down will display the over scroll actions
#Then move to left to tap on the add button
banner_element = driver_provider.driver.find_element_by_accessibility_id('banner')
screen_size = driver_provider.driver.get_window_size()
height = screen_size.get('height')
width = screen_size.get('width')
single_tap.press(banner_element, x=banner_element.size.get(
'width')/2, y=banner_element.size.get('height')/2).wait(1).move_to(banner_element,
x=width/2, y=height/2).wait(0.5).move_to(banner_element, x=0, y=height/2).release().perform()
for some reason press and move_to actions are not happening and there is no error returned as well, I am not clear what went wrong here. Please share your view on what went wrong thanks.
it's failing to perform press and move to because of wait value is very small. When I use the wait(500) then the press and move to is happening.
single_tap.press(banner_element, x=banner_element.size.get(
'width')/2, y=banner_element.size.get('height')/2).wait(500).move_to(banner_element,
x=width/2, y=height/2).wait(500).move_to(banner_element, x=0, y=height/2).wait(500).release().perform()
As, you can see in the above snippet, when i try to locate value e.g.. '16' in this case or i would like to scroll to select any other value. I am unable to select or scroll from this window. Is it possible to select value using robot framework with appium library. suggestions are most welcome.
One approach you can follow to do this is as follows:
First get the position of the element which is visible(In your case 16).
If you want to scroll down click on the element above 16 by substracting some pixels from the location you get in step 1.Verify for the element you want is highlighted or not.
I'm new to the whole VCM programming structure and more specifically to objective-c.
Right now i'm working on an iOS app that is like the game "connect 4." This Xcode project is my practice project that i've been using to play around/learn how to make iOS apps so there are several files and lots of commented out code, so Ill try my best to provide the necessary content from my project.
App State:
Right now I have a 10x10 grid of blue square/buttons. I'm still in the early stages of implementing the functionality of the game. Rather than making each square its own button, I created 10 frames and 10 buttons. Each row is a single button, which is broken up into 10 squares.
I currently have the squares change their color to red and become disabled once clicked. If I click multiple times.. the squares turn red when pressed. Heres a screenshot example run:
What Im wanting to do:
I want to build off of what I have, but not exactly sure how to keep track of which "players turn" it is. For example.. I want the first clicked square to turn red, representing player1's move. I want the second click to turn the button, say green, representing player2's move.. then the next move will be player 1's move.
I know Ill have to make sure the button is/was ENABLED and valid before switching which players turn it is.
How should I go about doing this? This is more of a general question, but I'll provide needed code snippets if necessary. Thanks!
In your .h file add an integer (variable)
int Turn = 1;
In your .m file you can do:
if(Turn == 1)
{
// Player one is playing
Turn = 2;
}
else if(Turn == 2)
{
// Player two is playing
Turn = 1;
}
I've started using OpenLayers3 in my app, and so far, I have succeeded in creating working versions of:
a combined draw/modify page (based on the relevant example, draw-and-modify-features.js)
a combined select/modify page (based on the relevant example, modify-features.js)
In the case of (1), the ol.interaction.Modify instance specifies that it will work on the features inside an ol.FeatureOverlay instance:
var modify = new ol.interaction.Modify({
features: featureOverlay.getFeatures()
...
...and it is that ol.FeatureOverlay that holds all the new features drawn by the user.
In the case of (2), the ol.interaction.Modify instance specifies that it will work on the features inside the ol.interaction.Select instance:
var select = new ol.interaction.Select();
var modify = new ol.interaction.Modify({
features: select.getFeatures()
});
...and unless I am mistaken, this creates a hidden ol.FeatureOverlay that holds the currently selected feature - which is then edited.
However, I can't see a way to combine all 3 - i.e. a user-friendly way to allow a user to draw, select and modify polygons.
What I'd (ideally) want is the functionality of draw/modify, but the moment I hit and keep Ctrl pressed, the cursor is no longer working in "draw" mode, but in "select" mode, allowing me to select one of the existing polygons, and subsequently hiting Delete on the keyboard to delete it, or just edit its vertices with the mouse. As soon as I click outside all polygons, I return to draw/modify mode.
I did the naive test - that of adding an ol.interaction.Select to the interactions of the draw/modify Map instance - which lead to hilarious results :-) For example, upon finishing the drawing of a polygon (i.e. when I double-click to close it) it's also getting selected... and clicking anywhere (inside or outside polygons) just starts another new polygon edge, it never selects a pre-existing one - etc.
My only thought of a solution so far is... for me to implement a "VI emulation" :-) i.e. a "command" mode (that is, the select/modify state) and an "insert" mode (i.e. the draw/modify state) - and you chose what mode you are in from a "state toggle" button inside the map (custom OL3 control) or outside the map (normal HTML button) .
I am, however, looking for a better way, like the one I suggested with holding Ctrl...
Any ideas/suggestions most welcome.
I never found a solution combining all three modes. Since no answer came up, I might as well share that in the end, having a "modal" form of working (i.e. hitting a custom control - a map-internal button - to enter "Select Mode") is not that bad. I ended up with a "Select mode", a "Draw/Modify mode", and a "Measure" mode - selectable via map-internal buttons:
In the end, it turned out fine - in hindsight, having a "combo" mode would in fact present significant usability disadvantages.
I am new to xcode and obj-c and creating my first iphone app. Right now, I am trying to display 2 NSMUTABLEARRAY data to TABLE VIEW, they are Name and Level. I want to display it like iphone's ringtones setting style:
john 1 >
Kate 2 >
... so onlevel is a value of 1-5 and editable. When user tap on certain row, let say tap on kate, it will display : 1✓ 2 3 4 5
and i can change the value of level by taping it and store new value to corresponding array. So let say i tap 5, the table will change too:
john 1 >
Kate 5 >
... so on
How do i do that?? Or is there any tutorial that closely show how to do that?
Lots of useful tutorials here: http://www.raywenderlich.com/tag/uitableview