On the iPad with iOS 4.3.
I've created a UIViewController.
I added a MPMoviePlayerController to the view controller, and loaded a movie.
I presented the UIViewController modally using UIModalPresentationFormSheet
I got what I wanted, a movie playing in a popup in the center of the screen..
But when I tap on the "enter full screen" button, the movie appears BEHIND the modal UIViewController. I'm left with a black square where the movie was. I can see the movie in the background, but I can't interact with it.
I am guessing that I either need to do something in the EnterFullScreen notification, but I don't know what. Or I need to do something completely different to show my movie in a popup. Something that isn't quite modal.
Related
I am working on a production app and I need to use an instance of AVPlayerViewController to play videos.
I would like to have a show segue present the controller by pushing it onto the navigation stack. However, this leads to strange behavior, because the user can press the full-screen button on the bottom right corner.
In Full-screen mode, there is a Done button which will exit full screen mode, but half the time, when I press Done, all of the playback controls disappear except for the scrubber which cannot move. Since I am in a navigation controller, the screen and the player is still there, but the playback controls break sometimes. It seems like the AVPlayerViewController is designed only to be presented modally and automatically dismissed with the Done button.
I know that in the documentation and example code, the AVPlayerViewController is presented modally into Full Screen and the Done button automatically dismisses it for you. But is it possible to push an AVPlayerViewController onto the navigation stack, without that strange Done button behavior?
Consider the following scenario on an iPad app:
The app is showing a fullscreen UINavigationController with some content.
When pressing a navigationbar button, a popover is shown (that shows a table with various controls).
A table cell in that popover offers to pick a photo from the device's photo library. For this, the UIImagePickerController shall be used.
According to the iOS HIG, the UIImagePickerController must be shown as a popover on the iPad.
Question:
What is the best way to present the UIImagePickerController in a popover in the above situation? (ie. from a popover)
Clearly I cannot show the UIImagePickerController popover from another popover.
Should I show the first popover content in a form sheet, allowing the UIImagePickerController to open in its own popover?
Or: When the button to show UIImagePickerController is pressed, should I dismiss the popover and show UIImagePickerController in a new popover from the same navigationbar button? At first glace this looks like an odd solution to me, but on the other hand it compares to the perfectly legal way to show UIImagePickerController in a popover when pressing a button in a UIAlertController/action sheet (which itself is technically a popover, too).
Any ideas are appreciated.
Heyo,
Right now I've got an app that presents a menu screen that partially covers the original screen, and can be used to navigate to other screens. This is done using a modal segue.
To get to another screen the from the base page the menu is presented, the user selects the next screen in the menu, the menu is dismissed, and THEN the segue to the next screen is preformed.
What I've spent a few weeks trying to figure out, however, is how to dismiss this menu DIRECTLY to a viewcontroller OTHER than the one that's presenting it.
I'm thinking I've got to figure out how to change a presenting view, but I haven't had any luck.
Currently I'm completely at a loss, and any recommendations/fixes would be great!
We are setting up our app hierarchy dynamically so their is no persistent Tab/Nav view controllers, its dependent on the database content.
We have recently added a feature which opens a VC to allow the user to select which database (layout/content) to display however this has caused out video playback to break when in fullscreen.
Previously (and currently) we playback videos within a Nav Controller (in a Tab) with a custom control overlay. This all works fine.
On the control bar there is a fullscreen button which fires the MPC standard fullscreen mode. Previously it worked fine, but now the sound continues playing in the background but no movie is displayed or an overlaying layer - I can still see our tab bar, which is clickable.
Could this be something to do with the order of views on the window? If so how can I pick up the correct one to bring it forward?
You can bring any subview to forward [view_1 bringSubviewToFront:view_2];
We found out the problem....
It was that we weren't setting the window.rootViewController in the end to the new view controller, we were only adding its view to the windows subviews
This fixed both this (just after I had written a custom fullscreen mode) and also problems we were having with rotation
I have two xibs, one is my title screen with buttons, the other is a more specific window that should come up when one of the buttons is pressed.
This isn't switching the whole screen, just a popup window, where clicking outside of the bounds of that window will make it disappear leaving only my title screen remaining as it was visible behind this popup view. This is similar to my understanding of "modal views".
Anyway I do not quite get how to connect it to the button on my title screen. I have the views made in IB ready to go. I'm not sure if I have declared all objects to satisfaction yet.
From what I understand I think I need a UIViewController or something, but its all a pretty thick fog of information right now
insight appreciated, or links to proper noob sources would be helpful
Does your title screen have a view controller (or is your app delegate the main controller object)? You will want to add an IBAction to that object, connect the button to it, and then present your other view controller modally (or in a popover) from there.
A popover will appear in a small window with an arrow, and tapping outside will close it. A modal view controller typically slides up into place, and you have to press a cancel button to close it. This guide explains how to use a popover. Using a modal view controller is simple if you have a view controller: [myViewController presentModalViewController:nextViewController animated:YES].