mainviewControllerビューにUISplitViewControllerビューを追加しました。コードは以下のとおりです。UISplitViewControllersのpresentModalViewController detailViewビューをフルスクリーンで表示しない
documentsRootViewController = [[DocumentsRootViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:documentsRootViewController];
documentsRootViewController.title = @"Document List";
documentDetailView = [[DocumentsDetailView alloc] initWithNibName:@"DocumentsDetailView" bundle:nil];
documentsRootViewController.detailViewController = documentDetailView;
docSplitViewController = [[UISplitViewController alloc] init];
docSplitViewController.viewControllers = [NSArray arrayWithObjects:navigationController, documentDetailView, nil];
docSplitViewController.delegate = documentDetailView;
CGRect splitViewFrame = CGRectMake(0, 0, cetralArea.frame.size.width, cetralArea.frame.size.height);
docSplitViewController.view.frame = splitViewFrame;
[cetralArea addSubview:docSplitViewController.view];
は今、私が何をしたい、私は私をクリックしてDetailViewControllersの内側に、以下のようにそれを行うにしようとしていますUISplitViewControllerのDetailViewからのViewControllerを提示することです!ボタンをクリックします。
- (IBAction) buttonClicked:(id)sender
{
NSString *phrase = nil; // Document password (for unlocking most encrypted PDF files)
NSArray *pdfs = [[NSBundle mainBundle] pathsForResourcesOfType:@"pdf" inDirectory:nil];
NSString *filePath = [pdfs lastObject]; assert(filePath != nil); // Path to last PDF file
ReaderDocument *readerDocument = [ReaderDocument withDocumentFilePath:filePath password:phrase];
if (readerDocument != nil) // Must have a valid ReaderDocument object in order to proceed with things
{
ReaderViewController *rViewController = [[ReaderViewController alloc] initWithReaderDocument:readerDocument];
rViewController.delegate = self; // Set the ReaderViewController delegate to self
[self presentModalViewController:rViewController animated:NO];
}
}
が、これは誰もが、ここでは事前のおかげで、問題が何であるかを提案することができます厄介なプレゼンテーションに
を結果ます。..
よく説明されています! –
@ Vishal nopes ..私はまだ改善する必要があると思うけど、最初はそのk;) –
@Shashank私たちも同じ問題に直面している。あなたはそれを解決しましたか? – Hitarth