I have an issue in customizing the appearance of my QLPreviewController
.
We can display a QLPreviewController by pushing it in a navigation controller, or presenting it in a ModalViewController. Since my navigationController's bar is customized a little (tintColor), I'm pushing the QLPreviewController to preserve my color scheme. But when I push it, the QLPreviewController seems to have some problems : I need to systematically call [qlpvc reloadData] so that my file is displayed.
In iOS [REDACTED], even with reloadData, nothing displays in the pushing way, (actually it displays but in a random way). So I decided it could be interesting to only use the reliable Modal way.
Soooo my point is that I want to present my QLPreviewController in a ModalViewController. It works great that way, but I can't customize the viewController appearance.
For example in a didSelectRowAtIndexPath
if I do :
(I don't have my sources near to me so excuse me if I do a mistake)
QLPreviewController *qlpvc = [[QLPreviewController alloc] init];
qlpvc.dataSource = self; // Data Source Protocol & methods implemented of course
No need for delegate in my case so //qlpvc.delegate = self;
qlpvc.currentPreviewItemIndex = [indexPath.row];
// The following doesn't work :
[qlpvc.navigationController.navigationBar setTintColor:[UIColor redColor]];
// The following doesn't work too :
[qlpvc.modalViewController.navigationController.navigationBar setTintColor:[UIColor redColor]];
[self presentModalViewController:qlpvc animated:YES];
[qlpvc release];
tl ; dr version : How to manage to customize my modal QLPreviewController's appearance ? Especially the tintColor of the navigationBar ?
Thanks a lot.