MPMoviePlayerController fullscreen not working with adjusted VC hierarchy - ios

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

Related

Youtube-like video control bar in the bottom

In the youtube app there's a possibility to collapse video into a small preview window with a playback and controls while you navigating in the different parts of the app. By tapping on the window you can always switch to full screen mode again.
I wonder: what't the best approach to implement similar functionality? For now I see few options but I'm not very well aware of the implications of these options.
Note: I have an iPhone tabbar based app.
Create a popover modal view controller, that is presented on top of current navigation stack in a current tab
Create a view and stick it to the bottom of the screen.
Create a view in bounds of a tabbar controller
Create a modal view controller embedded in tabbar controller.
Just from the list I suspect that using a specialized UIView (2) would be the worst possible way to do this. But I don't know about the rest. Any advice would be greatly appreciated.

AVPlayerViewController in Navigation Stack Possible?

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?

I get a black flicker from splash screen to my tab view controller in iOS

I'm using Swift & iOS. I have a Storyboard based launch screen (white background with logo on it). Then, the app launches either into a RootViewController which is a programmatic view controller that inherits from UIViewController. It uses SnapKit. It loads either loads login view, or tab bar view based on whether you're logged in or not.
For some reason, I see a black flicker. Is this due to having no animations? Or is it something else? thank you.

How can I make a UIView to appear on all my app Screens as long as it is visible iOS objective-c

I am building a music application i want a view to show on all the screens in my objective-c ios app, above the Tab bars (all the screens of all the tab items) when the app is currently playing a song or a song is only paused. Similar to the iPhone/iPad music app as shown in the image below:
You can add your view directly to the UITabBarController's view.
[self.tabBarController.view addSubview:musicPlayerView];
This way it will be visible in all your Tabs.
Just an addition, it would be a better approach to subclass UITabBarController and initialize / add the musicPlayerView in your custom class.
Use UINavigation controller and it will last forever as you need.

iOS animations stop working until camera is launched

I have a view in my app that displays files and allows the user to reorder them and there is a navigation pane that animates in and out of view. Also while reordering files there is an animation as they slide into place. Touching one of the files loads the details in a modal view.
My problem occurs when loading a modal. They will work for awhile, but then one will animate up and when its dismissed it just snaps off screen without an animation and from that point forward no animations run, everything just goes to its final position (my animations and iOS modals and UINavigationController pops and pushs, even rotation just snaps to the new rotation)
My app allows for loading up the default camera for taking pictures to add to the file list and when the camera loads it animates up and after it closes all animations work again for awhile until a modal messes it up again. I've been on SO looking for a solution and I've found some similar things, but I haven't found anything that fixes the problem.
These modals are loaded using presentModalView and the information shown in them is static
Edit:
I don't think the code is all to helpful, I'm using a story board so I'm calling the segue and then preparing the segue with the following.
PhotoVC* destinationVC = (PhotoVC*) segue.destinationViewController;
destinationVC.displayImage = m_sendImage;
I have nothing running in the willAppear of either view. None of my animations are active when the modal is presented.

Resources