How to open a file on iBooks

前端 未结 1 1317
时光取名叫无心
时光取名叫无心 2021-01-15 19:48

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 = [U         


        
1条回答
  •  心在旅途
    2021-01-15 20:23

    just use this

    NSURL *url = [NSURL URLWithString:stringURL];
    [[UIApplication sharedApplication] openURL:url];
    

    Where stringUrl is your filePath, with itms-books: at the beginning

    See this related question How do I launch iBooks e-reader programmatically on iPad?

    0 讨论(0)
提交回复
热议问题