Segue destinationviewcontroller pdfviewcontroller not displaying pageviewcontroller
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"MYSegue"]) {
// Get destination view
PDFViewController *pdfviewController = [segue destinationViewController];
NSString *path = [[NSBundle mainBundle] pathForResource:@"paper" ofType:@"pdf"];
PageViewController *page = [[PageViewController alloc] initWithPDFAtPath:path];
pdfviewController= page;
}
}
shows only navigation bar and backbuttonitem
and shows semantic issue incompatible pointer types assigning to pdfviewcontroller strong from pageviewcontroller strong.
Thanks for help.
This line is wrong:
As the compiler tells you, the type is
PDFViewController *
and you're trying to assignPageViewController *
.Did you mean something like:
The segue should just do:
Add some properties to the pdf view controller:
Then in the pdf view controller