actually I’m quite new with Xcode and couldn’t find the answer to the following two questions by a google search:
-
to make it short: I’m working on an iPad app that displays proposals. For this purpose you should choose a proposal from the table in MasterView and then see the details in the DetailsView in landscape mode (but without the MasterView on the Spitscreen).
So when the app starts in landscape mode, I wanna see directly the first proposal full screen on the DetailsView. And when I tap onto the screen the MasterView should popup/unhide with the other proposals in the table. Is this possible? -
I wanna display the PDFs in a WebView like in iBooks. That means that the navigation bar is hidden and only when I tap onto the screen the navigation bar should appear at the top of the screen.
I’m kind of sure this questions have been solved somewhere but I couldn’t find anything by search so I hope you can help me anyway 🙂
Thanks in Advance!
Q1: Use can use one of many methods to present a view (look up under Apple’s doc on UIViewController under “Presenting Another View Controller’s Content” heading). Two that I have used are:
– presentModalViewController:animated:and– presentViewController:animated:completion:(the latter is the latest addition in iOS 5.0)So let’s say you have a detail controller called
MyDetailViewController, in your Master View Controller’s implementation file (the .m file), underviewDidLoadmethod, you would do some thing like this to present it as a full screen view.To dismiss or hide this
MyDetailViewControllerwith a tap or touch, you can use UITapGestureRecognizer or touchesEnded method and using one of the dismiss methods (refer back to Apple’s UIViewController again for this).Q2: I personally have not used UIWebView to display PDF and not sure if iBooks is using UIWebview to do it. But to display a varieties of popular documents formats, you can use either the QLPreviewController class or UIDocumentInteractionController. You can hide the toolbar while the document is displayed.
Good luck.