ibooks

Open local PDF file in iBooks

坚强是说给别人听的谎言 提交于 2019-12-22 00:56:19
问题 I am trying to open a PDF file that I have stored locally within my app in iBooks. The app currently has a list of "literature" in a table view and when each cell is tapped the app segues to a webView that displays the PDF file (works great). I have made a BarButton at the top right in navBar to allow the user to open the PDF in iBooks (so they can store it on his/her device). So far the button will open a UIDocumentInteractionController that displays all apps on the device that can open the

Why are some widget elements not showing up when embedded in iBook?

允我心安 提交于 2019-12-21 17:28:12
问题 I created a widget in Dashcode. It has some buttons, text fields and texts. It works fine when run from Dashcode or when installed into the Dashboard. When I install it into an iBook (via iBooks Author) and run it on the iPad then the buttons and texts all disappear (as well as a few other minor visual changes). Interestingly if I tap where some of buttons are, it invokes the button click event, but others don't work. Also, when a button click event updates the value of a text then that text

an app to open iBook and then this particular pdf/pub file straightaway in one go

旧时模样 提交于 2019-12-21 06:39:55
问题 Is it possible to open a pdf file from an app itself into iBooks. OR any 3rd party solutions, that can use any pdf file and create a flip book thing in an app itself. 回答1: You can indeed open a PDF file from an app into iBooks (or any other installed app that can read PDF files). To do this, you can use the UIDocumentInteractionController NSString *pdfPath = @"path to your pdf file"; NSURL *url = [NSURL fileURLWithPath:pdfPath]; UIDocumentInteractionController *docController =

How does the iBooks App format the text on separate pages?

有些话、适合烂在心里 提交于 2019-12-21 03:48:53
问题 Looking at the iBooks App, I was wondering how it accomplishes to format text (probably a very simple txt file) so that it is NOT SCROLLABLE but divided on separate pages. I'd like to achieve the same, but only with editable text. Where would I need to start? UITextView doesn't work as it scrolls. Even if I set the pagingEnabled property to YES, it won't do the job. It seems as if I need to LIMIT the amount of text I can put on a certain page. Is there a function to LIMIT the input of a

How does iBooks do this?

妖精的绣舞 提交于 2019-12-20 10:57:14
问题 I am currently displaying text in a uiwebview. However, I would like to allow a user to select text and perform some action with the selected text (google it). Apple has done this sort of thing with iBooks. When you click on a word you can choose to look up the word in a dictionary. How can I do the same thing with Webview? UIMenuController seems to be what I need to look at. But I couldn't find any sample code on how to do this. I'm new to iPhone development please help. 回答1: Starting in iOS

fetch pdf from iBooks to my app

三世轮回 提交于 2019-12-20 02:43:17
问题 is there a way to list pdf documents stored in iBooks from my iPad app ? The pdf would be first uploaded in the iPad through iTunes and then my app would list the titles. Clicking on a title would open the pdf in iBook. Cheers, Tib. 回答1: No. All apps are sandboxed and cannot access each other's data unless there is a specific API for it. Since that is not the case for iBooks, it's not possible. 回答2: This was not possible in the past. It's now available using Document Picker on iOS. The only

How to open a file on iBooks

主宰稳场 提交于 2019-12-19 11:49:21
问题 How can I open a book on iBooks? I tried the following code, that works, but asks the user to choose an application to open the file: self.docController = [UIDocumentInteractionController alloc]; //leaves only the file name NSString *bookFile = @"my-book.pdf"; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex: 0]; NSString* filePath = [documentsDirectory stringByAppendingPathComponent: bookFile

epub 3, how to prevent pages from running in background ? (iBooks / Readium)

痞子三分冷 提交于 2019-12-12 10:09:44
问题 I have created and validated an ePub 3 which I am currently testing. I am using a fixed layout.. <meta property="rendition:layout">pre-paginated</meta> <meta property="rendition:orientation">portrait</meta> <meta property="rendition:spread">none< /meta> It works nicely, however multiple pages seems to load and run at once when testing in different readers. I'm using jQuery's document ready to kick things off and play audio, run animations, etc. When testing in iBooks I open the book to page 1

Is there a URL Scheme for iBooks?

蓝咒 提交于 2019-12-11 08:39:18
问题 I have an app that would like to be able to jump to a specific pdf or iBook in iBooks? Is there a URL scheme for doing this? The latest copy of the Apple URL Scheme Reference was last updated in 2010. 回答1: from your desktop just copy URL from Books section in iTunes (use "Copy Link" option) and this will you give Apple iTunes link to given book with regular URL with http:// protocol - no hackery-pottery (with undocumented protocols schemes in 5.1OS) and it just works. regards, Peter 来源: https

How do I load a webview page with a pdf into ibooks using Swift

人盡茶涼 提交于 2019-12-11 02:35:56
问题 This is closest code I can find but doesn't have syntax for using the webview page that contains the pdf file. var docController: UIDocumentInteractionController? if let path = NSBundle.mainBundle().pathForResource("book", ofType: "pdf") { if let targetURL = NSURL.fileURLWithPath(path) { docController = UIDocumentInteractionController(URL: targetURL) let url = NSURL(string:"itms-books:"); if UIApplication.sharedApplication().canOpenURL(url!) { docController!.presentOpenInMenuFromRect