문제

I'm not sure why this code isn't working. Any ideas? iBooks opens, but nothing is presented.

NSString *fileToOpen = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"ibooks"]; 
NSString *stringURL = [NSString stringWithFormat:@"itms-books:%@", fileToOpen];
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
도움이 되었습니까?

해결책

The itms-books: URL scheme is for links to the iBookstore. If you have a PDF or ePub file you want to allow the user to open in iBooks, look into QLPreviewController or UIDocumentInteractionController.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top