I am adding terms and conditions to my app in a UIWebview. What i really want to know is can i show it as a page by page pdf document or should i use any other method? Will App store accept the pdf format?
Yes, this can be done using UIWebview
and surely will get accepted by Apple.
If you are trying to display a PDF file from a web URL , use the below code.
NSURL *targetURL = [NSURL URLWithString:@"http://yourdomain.com/file_toopen.pdf"];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
[webView loadRequest:request];
Or if you have a PDF file bundled with in your application, use below code.
NSString *path = [[NSBundle mainBundle] pathForResource:@"filetoopen" ofType:@"pdf"];
NSURL *targetURL = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
[webView loadRequest:request];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With