IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label UIViewcontroller. Show all posts
Showing posts with label UIViewcontroller. Show all posts

Saturday, March 1, 2014

Load PDF in UIViewcontroller

Hello!

I am creating a simple PDF reader. All of the sample codes that i saw i had to tap a button to open the pdf. But what i really want is to open the pdf file when te app runs, without tapping a button.

This is my viewDidLoad code in ViewController.m:

 

- (void)viewDidLoad

{

    [super viewDidLoad];

    NSString *path = [[NSBundle mainBundle] pathForResource:@"399_KIT_ELEITORAL_BX_01" ofType:@"pdf"];

    PageViewController *page = [[PageViewController alloc] initWithPDFAtPath:path];

    [self presentViewController:page animated:YES completion:NULL];

}

 

When i run the app, it doesn`t show the pdf.

 

Thank you!


View the original article here