UIWebView open url from file - ios

I am making an app on iphone and I have got stucked at one point. I want to read a text file which has some list of URLs and then I need to read that file and open those URLs one by one in UIWebVIew. Can anyone suggest me how can I do that?? with some sample example.
Thanks in advance.

Check out NSDataDetector, you can find links by dataDetectorWithTypes:error: using NSTextCheckingTypeLink. More documentation: https://developer.apple.com/library/ios/DOCUMENTATION/AppKit/Reference/NSTextCheckingResult_Class/Reference/Reference.html

Related

how do i link from an ibook to another?

I'm making an catalog for a client with al his products. Each product has his own pdf-file. Now i want to link from the main catalog to another pdf-file in my ibook.
These files are already in ibook, it's necessary to link without an internet connection. Does anyone now how i can link to this file? Or does anyone know the path to reach this document?
I'm looking forward to any of your answers!
As far as I know that is not possible.

PDF generation in XCode

I am a newbie in iPhone development. I am planning to do a PDF application for iPhone. The functionality is:
User will type their input in a text field (which is going to be the content of the PDF file).
I have to modify the PDF file through code while saving (paragraphs, tables, bullets etc).
User can save it in their own name.
User can send the PDF file as attachment of MFMailComposer.
So I have searched and got many links. However I didn't find any leading details to create and modify a PDF file in iPhone/iPad.
Can anyone please provide me a good reference to do this. Are there any alternatives to do this?
I've used this reference: https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
It contains theoretical explanations and source code examples
Please use the below link to download sample apps for PDF Reader/Viewer in iOS
PDF Reader/Viewer in iOS
Also please look at detail about pdf creation, manipulation etc in below links
developer.apple: PDF Document Creation, Viewing, and Transforming
Fast-and-lean-pdf-viewer-for-iphone
If you were doing a Phonegap app I'd say got for jsPDF, which would enable you to create (basic) PDF files in Javascript. I don't do Obj-C, but a quick look on SO provides good links.

Embedding "com.apple.ibooks.display-options.xml" file into epub

I want to add the com.apple.ibooks.display-options.xml file which is described in the ibooks documentation for publishers.
I am using sigil to create my books but i can't add this file within my epub book file.
Can someone show me how to do it?
As far as I have been able to work out, you can not add it with Sigil. Even once it is in Sigil, you can not see the contents of the file; you are only able to see the file is there. Take a look at some of the example projects in this post.
Open the epub file with 7zip, then add the com.apple.ibooks.display-options.xml. That should do it, it did work for me.

Highlights Epub open in UIWebView

Any one can help me out for highlighting on epub. I open epub on UIWebView and allow user to highlight the text which he can see in future too. I am having database to store highlights detail. I am able to highlight using javascript. But since it uses range etc it remain till page is not change or reload.
Those who donot know what is epub you can suggest me on simple html page.
Please any one can suggest me how to implement highlight just like ibook have
Any logics?
Thanks in advance
See the following for the Javascript required:
https://github.com/fedefrappi/AePubReader/blob/master/AePubReader/SearchWebView.js
Download entire project to see how it's used.

PrettyPhoto Error: Image cannot be loaded. Make sure the path is correct and the image exists

I've searched a series of forums and I've noticed that a lot of people had this same issue. I tried all the resolutions: using the longer Youtube URL like
http://www.youtube.com/watch?v=GkqS5DiF2_A
defining the width and height of the image, and I've tried using older versions of JQuery. I'm still receiving the error. I've linked all the images in the CSS file [incorrectly, but they are linked :)]. I've been trying to solve this for days and I'm not sure what I'm doing wrong.
Any help would be greatly appreciated. Thank you!
It appears that you have to add ?iframe=true to the end of the hyperlink
https://stackoverflow.com/===>http://stackoverflow.com?iframe=true
did the trick for me. Make sure you point direct to the web page you want to appear in the light box, not to the iframe.
I had the issue with WordPress,
I simply removed the alert.
file: /wp-content/plugins/prettyphoto-media/js/jquery.prettyPhoto.min.js
I use http://jsbeautifier.org/ to unfold the code
and comment line 350:
//alert("Image cannot be loaded. Make sure the path is correct and image exist.");
The links to the youtube video are not direct, you are using some kind of redirects. i suggest you use direct links to the youtube video
here is a demo of your site http://www.mediafire.com/?vj3l062uza7ov61 , see the left video

Resources