Container view is expected to be populated at this point

492 views Asked by At

i have a simple ios implementation. There is a tableviewcontroller embedded in a navigationcontroller and a qlviewcontroller in this implementation, navigationcontroller is embedded in a tabbarcontroller too.

Actual tab lists a lot of image files, if a cell is selected in the tableviewcontroller, a qlpreviewcontroller will be instantiated and image file will be shown. another tab shows only settings of app.

i have subclassed the qlpreviewcontroller. The instance of this subclass will be created with the following code part;

XYQLPreviewController *qlpvc = [[XYQLPreviewController alloc] init];
qlpvc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:qlpvc animated:YES];

i want to hide tabbar in the preview controller so that there is enough place to preview.

these all work very well with ios 6 and below but with ios 7 i have the following problems;

  1. Back button of navigation bar in qlpreviewcontroller doesnt respond, its not clickable.
  2. if i back navigate with this new cool slide transition of ios 7, ta ta my tabbar got lost, i see only a white layer at the tabbar not my cool tabbar.

i see the following log message in log screen,if i select an image file and instantiate the subclass of previewcontroller.

"Container view is expected to be populated at this point"

what a problem can it be , i have no idea.

Please help.

PS:i have only a xib file not the storyboard.

1

There are 1 answers

0
valheru On

If you want to hide the tab bar, I would say your best bet is to present the preview controller as a modal instead of pushing it onto the stack. Then when the user closes it (instead of hits back), it will bring them back to the tab bar view.

[self.navigationController presentViewController:qlpvc animated:YES completion:nil];