mainviewController 뷰에 UISplitViewController 뷰를 추가했습니다.이 코드는 아래에 있습니다.UISplitViewController의 presentModalViewController detail 전체 화면으로 뷰를 표시하지 않습니다.
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];
지금 내가 원하는 것은 UISplitViewController의 DetailView에서의 ViewController을 제시하는 것입니다 나는 나를 클릭 DetailViewControllers 내에서 다음과 같이 그것을 위해 노력하고 있어요! 버튼을 클릭하십시오.
- (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