How to show pages index in side when showing the pdf in uiwebview - iphone

In the above image, we can see the navigationbar and pages index(side) which can viewed when the user tapped the screen once and will be removed from superview, on another tap.
I added the navigationbar using tap gesture recogniser, but to show the pages index I didn't know what to do and even how to search in google?
Any help will be appreciated.

Since you have added the uiwebviewtag to your question, I guess you are using a uiwebview to read the pdf.
In this case, there is no way to add a sidebar with the page index.
The only way do it is to develop your own viewer using Quartz, or to use an existing library.

Related

Flutter on tap not working on Html element view

The webpage I'm loading contains a HtmlElementView class which will load an URL. And I am having an action in app bar and when I am tapping on a option, It is not responding.
In the reference image the account settings option is clickable because it is outside the HtmlElementView but the others two options are not clickable because it is on top of the HtmlElementView. Help me with an solution for this.
There seems to be no in easy way of dealing with this in flutter.
So the best option is to use pub.dev/packages/pointer_interceptor
Thanks to #Pat9RB for finding this!

Swift: How to navigate to a PDF page after clicking TableViewCell from another VC

I am building an app, where i have loaded a PDF of 300 pages. This PDF has lot of content, which are added as keywords to the tableViewCell in another VC.
When i tap any cell from VC, it should navigate to the next VC, where i have a UIWebView which has the PDF.
Now the ask is, when i press this cell, the new VC directly should navigate to the given page where the information related to that keyword is present.
Any idea or points on how to show a given page in PDF will help.
Thanks.
Because you're dealing with web, it is hard to have native navigation. I know from web development experience that to navigate to a specific part of a website, you can use anchor points/tags. I'd recommend looking into those. With them, you can change the URL from somepagehere.com to somepagehere.com/#page-1 or somepagepagehere.com/#-2, etc. Then, with the the UITableView you can point directly to these anchor points.
Let me know if this helps!
From your questions, it seems like you have a 300 page PDF file from an online location and you gather all the menu in your table view and each cell has the same url pointing to the link of the PDF.
This is not a good practice on the first place. This means that you are reloading the PDF file again and again when user simply want to see contents from another menu. It's also extremely hard to deal with paging problem from a web view.
Instead, if your pdf is well formatted(meaning it has a menu page and when you click on them from Adobe PDF reader, it can jump to the page), simply use this PDF reader. It also provides you the menu by itself and you don't need to have a table view controller and a webview controller. Moreover, you just need to put PDF file in your main bundle and never need to download every time.

UIWebView: several pages with horizontal scrolling

I am having a difficult time finding any information on this and I think it's because I am looking at this all wrong.
I am trying to create a UIWebView that has several webviews within it. The way I picture this is a UIPageController with dynamic pages being loaded or a scroll view that has dynamic UIWebViews in it so that the user can guesture left or right for "next page" and "back" operations with a nice scroll like animation to the next webview page. The problem is I can't seem to find any information on how to set this up properly and in xCode 4.2. The other part of the problem is that the number of pages is never known to the app but I can find out if there is a "next page" (currently by using javascript in the UIWebView and passing the new url to [webView loadRequest:]). Can someone point me it the right direction?

Customizing the Facebook view

I need the lightblue bar to scroll up (hide) and display the Facebook bar. For example look at this image.
I need the light blue bar (which contains the search bar, refresh button) to be scrolled up, so it hides and displays from the Dark Blue Facebook bar as shown in this image.
I have seen this in many applications but, how can i implement it in my application programatically ?
There's no way to control safari from your app, and since Facebook serves the HTML there's no way to alter that either. So to achieve what you're looking for you could create your own UIWebView and present it modally instead. The issue you'll have here, though, is that you won't have access to the users cookies, so they'll have to log in to Facebook again.

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.