how do you pop up the Save Image/Open in New Page/Copy menu on command in mobile safari? - iphone

I need to find out how to make the menu that appears in mobile safari on the iphone/touch when you tap & hold an element appear on a single tap without having to hold. how would i do this? preferably i would use webkit & no js.

UIWebView does not does not call any methods until a link is actually activated, and it does not expose any information about its subviews. There is no way to do with current SDK, you should file a bug with Apple if you need this functionality.

Related

How to use Flutter to implement a button like ios virtual home button

I want to create a button can move to any position like iPhone Style (Virtual Home Button) in Flutter but I don't know any packages or any library can do it. Moreover, I'd like the button to be able to show along with a specific app, eg. dial-up UI. If I deploy to desktop, will its behavior the same with mobile?
ios virtual home button
show button along with dial-up UI
Hope you guys help me ways to create it.
I have tried with unicorndial, floating_bubble, popup window, etc.
but all of them are widget within flutter app, instead of system-wide.
Sorry you can't really create anything like that outside of your App context. Apple is very strict in situations like this.
You can implement this sort of feature in Android by using Floating Service. But for Apple it's a NO NO.

How to navigate to different pages in a chrome app without creating a new window?

My Chrome app contains two pages A1.html and A2.html. How can i navigate from A1.html to A2.html without creating a new window?
The page A1.html contains 10 div's and A2.html contains a back link to A1.html. My need is to load directly a specific div of A1.html when the back link in A2.html is pressed.
You can't navigate within a Chrome App window (Content Security Policy), although you can navigate to an external browser if you set the target attribute of the <a> element to "_blank". What you have to do, if you really want links to appear to work normally, is intercept the click on the link by setting an event handler and then changing the DOM from within JavaScript.
One easy way to change the DOM from JavaScript if you have an HTML fragment is to use the insertAdjacentHTML API (Google it for documentation).
While this might seem awkward, even limiting, think of a Chrome App as an app, and not a web page. After all, with a native Mac OS X or Windows app, you wouldn't expect to entirely change the UI in a window by simply clicking on a button, right? You'd expect that the app would do that via the native API. Same the Chrome Apps.
Alternatively, you can position a webview in the Chrome App window, and then HTML within the webview works normally, because that really is a "web view."

Accessing elements of webview within a native iPhone app using UI Automation

I am working on UI test automation using Apple's UIAutomation framework for a native iPhone app that uses web views for its checkout transactions. The problem I am facing is that when I tap on Checkout button from the native app, a webview within the app opens up which has a button named 'Complete Checkout' that I am not able to access. I have tried using target.logElemenTree() to get the elements of the WebView, but I do not get to see anything in Instruments. Can anybody let me know how to access webview elements within the native app on iOS?
You can get the X,Y coordinates of the Complete Checkout button and have UI Automation tap it. For example, if the X,Y coordinates of the button are x:10, y:20 you would run target.tap({x:10, y:20});
If your checkout button is a link inside a webview then you will be able to access it.
check the property of the "complete checkout". Tapping using X and Y co-ordinates is not a recommended option.

Adding Web Shortcut to iPhone Homescreen?

How can I BY CODE add a web shortcut to iPhone HomeScreen?
There is no API to do this. Your best bet is to do what many web apps do: create something that points at the part of the toolbar where the add to homescreen button exists. And pray Apple doesn't change the position of that button any time soon.

How to drag the url in WebView and drop to a textlabel

I have a webview and want to drag the url on the webview to a textlabel.
I know there is the option of 'Copy', but I prefer to do as the dragdrop function in normal computer.
Is this possible for iphone app?
Welcome any comment
Thanks
interdev
I am assuming you want to drag&drop a hyperlink from an HTML page rendered in a UIWebView control to another control on the screen.
Unfortunately I doubt that this is trivial, if at all possible. There is no documented way to find out if a UIControlEventTouchDown event received by a UIWebView object is hitting a rendered hyperlink and discover that hyperlink's URL.
If you were able to do that, you would still have to create and show a custom view that would track touchesMoved and touchesEnded to know when the user drops it, and if it falls on the intended destination control.