Это метод init для UINavigationController. Думаю, я должен делать это неправильно.Панель навигации скрыта за содержимым
- (id)init
{
self = [super init];
if (self) {
self.view.backgroundColor = [UIColor blackColor];
self.viewController = [[UIViewController alloc] init];
self.viewControllers = [NSArray arrayWithObject:self.viewController];
UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:@"Done"
style:UIBarButtonItemStylePlain
target:self
action:@selector(done)];
self.viewController.navigationItem.rightBarButtonItem = button;
self.navigationBar.barStyle = UIBarStyleBlackTranslucent;
self.mediaScrollView = [[MediaScrollView alloc] initWithFrame:self.view.bounds];
self.mediaScrollView.touchDelegate = self;
self.mediaScrollView.fullScreenDelegate = self;
[self.viewController.view addSubview:self.mediaScrollView];
}
return self;
}
mediaScrollView происходит перед моей навигационной панели. Он должен появляться за панель навигации.
Это метод для вызова его:
self.mediaVC = [[PDMediaViewController alloc] init];
self.mediaVC.mediaScrollView.manualMedia = YES;
self.mediaVC.mediaScrollView.mediaDelegate = self;
self.mediaVC.mediaScrollView.currentMediaItem = 0;
self.mediaVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:self.mediaVC animated:YES];
не подкласс UINavigationController (если вы * действительно * не знаете, что вы делаете!) –