UIWebView -> "Add to Reading list is not displaying" - ios

I have a UIWebView and I open a website in it. The website contains lot of hyperlinks. I get an action sheet when I long-press it in Safari: Add to Reading list, Copy and Open are displaying. However in my UIWebView Add to Reading list is not displaying (below 6.1).

You need to add that option programmatically yourself. Also note that you cannot access Safari's Reading List programmatically.
For doing this, you would need to add an UIActionSheet to your view and display it when a link is tapped in your UIWebView.
For your reference have a look at this question: how to change UIWebView Tap events

I solved above problem. I customized the contextual menu of UIWebView,
.
Sample application for customize the contextual menu of UIWebView

Related

How can I present a long-press menu for a link in a UITextView that is a custom URL scheme of mine?

In my app I have a UITextView where I parse the text, detect references to content in my app, and add hyperlinks to that content via NSAttributedString / NSLinkAttributeName. Right now I have it set up so I can handle taps on those links via the UITextViewDelegate method textView:shouldInteractWithURL:inRange:interaction: and show a popover with the relevant content.
I notice, though, that for URLs that the system understands, if you long-press on a link in a text view, it gives you options for that URL type, and even a preview if it's a web link or something that can easily be previewed. My question: how do I provide custom actions and/or custom previews for my own URLs?

Issue with openning PDF in iOS 11.3 Using PWA

I've used Vuejs and Framework7 in my PWA. I want to open a remote PDF file in my PWA and also it's important to me that users be able to back to my PWA after opening PDF. I did this using :
window.open(pdf_url, "_blank");
And it works fine for iOS > 12 and after opening pdf file there is an "OK" button for closing pdf.
But for example in iOS 11.3 there is no button and user has to use home button to close PWA.
I tried to solve problem using iframe but I can show only first page of the pdf.
Is there any way to fix this issue?
You can resolve this issue by doing some tricks (for any device without back button):
if you use iframe, you can set height manualy with overflow scroll, and I think this will resolve issue (dependence of style or lib dependency, so that may be not work).
you can add back button to your navbar, or Toolbar to let user click on it to back to previous page. (I prefer this solution).
you can render pdf in popup nested of normal html page, and then you can customize popup component by handling back button, or handling close by dropback overlay.
I use second and third point in real project and its work fine...
This is sample close button code used in popup:
'<p>'+ i18nextHelper.i18next.t('Exit From PDF') +'</p>'
Note: You can also customize height page for pdf page only, and add normal button bellow it, or by add absolute positioning button above PDF, but I think if you use second or third point will be best.
Good luck.

Creating an alternative keyboard for UIWebView

I have a note taking app. I want to add my own custom keyboard for user input. My app uses UIWebView. When app opens, a UIwebview loads index.html file that contains a content editable div.
I made a keyboard with javascript and when index.html is loaded, my keyboard (actually a table with buttons) shows and ios keyboard disappears.
I am hiding ios keyboard with this function
UIView *v=[[[UIApplication sharedApplication] windows] objectAtIndex:1];
v.hidden=true;
I wonder will apple approve my app? I couldn't find anything says this is wrong? I just want to add my own keyboard to my app? UIWebView loads only my html file for note taking.
The guidelines says
If appropriate, you can design a custom input view to replace the system-provided onscreen keyboard.
So I guess, there should not be any issue. You can find more informations here.

ios webview open link in different tab/webview

I have two tabs (things that are at the bottom of the 'Clock' app) both have webviews. how can I make a link that was clicked on first tab's webview be opened (and show to user) in second tab second webview if there is a string "test" in the URL.
thnak you!
You'll need to set a delegate on your UIWebView and then handle the delegate method to be able to intercept the click and send it to the tab you want.
Here's an example: UIWebView open links in Safari

How to create tabs in a ipad app that is similar a web browser tabs

I have a requirement to create a ipad app that supports tab to view content. I have created a custom splitview controller, whenever user goes to a particular section in the left section, the contents related to that will be displayed in the content view(right view). If a user selects a particular link in that content view it should open a tab and display the contents of that link in that new view. Similar to Web Browser tabs i need to handle tabs in this app. Please suggest any available open source component or any ideas to implement tabbing inside a ipad app.
You can use Three20 for your tab purpose. Also there are many open Source components available. You just need to search in google.

Resources