Hide/Show Controls Notification for MPMoviePlayerController - mpmovieplayercontroller

Is there a way to listen for changes in the player controls visibility for MPMoviePlayerController?
I have added two buttons to the container view above the MPMoviePlayerController view and it's controls.
I would like to hide/show these buttons in sync with when the player controls hide or show. I want the two buttons to look part of the players control bar.

Related

Xamarin Forms Scrollview and using Drag and Drop Gesture Recognizer

I have a scrollview that has a bindable stacklayout inside it with a Item template that is using the drag and drop gesture recognizer. This works no problem but on android the drag gesture recognizer fires off immediately as soon as you start scrolling the screen. I'm curious if anyone has any ideas on how to handle keeping the gesture recognizer but also allow for the user to scroll the screen without dragging around an item in the list.

Using infinite scrolling UICollectionView with iOS 13 pullable modals

I have a modal window, which is perfect for iOS 13's drag to dismiss gesture, because this way the user remains in the context, so I don't want to use full screen. The controller contains a UICollectionView which displays a month calendar, which is scrollable vertically.
The problem is, that when the user wants to scroll upwards in the collection view, the dismiss gesture is triggered instead. If I scroll down first, then can I only scroll up.
I've tried to disable the internal UIPanGestureRecognizer (it seems somehow there is no presentedView, so it didn't work), tried to set the UICollectionView's pan gesture recognizer delegate to prevent the system recognizer to fire (it turned out you can't do that), and tried to scroll the collection view on appearing a bit (ugly).
How can I elegantly convince the the modal presentation, that my scrollview isn't scrolled to the top?

Sheet presentation disables NSMagnificationGestureRecognizer

So I have a view with attached Pan and Magnify gesture recognisers in a view controller.
When I present the view controller using the Show, Modal or Presentation segues, both gesture recognisers work fine. But when I present it as a Sheet, only the Pan recogniser responds to input. The Magnify recogniser simply doesn't fire at all.
Sample project here. Use the buttons in the first window to show the view controller in different methods, and gesture anywhere in the presented view. The indicators will show which gestures have been recognised.

How to make a scrolling bar of buttons (buttons bar) with Cocoa?

I would like to have buttons inside a scroll view (or another solution to creating a scrollable button bar).
I have buttons placed side by side in a row along the top of a view. As a user resizes the window to be less wide, fewer buttons can be seen.
When all the buttons cannot be viewed, I would like the user to still be able to access all the buttons by scrolling horizontally through them.
To visualise this, imagine in Safari if you open too many tabs to fit in the window - I would like the user to be able to scroll to the right and reveal the tabs that weren't on the screen.
You need to deselect the springs (for the custom view of the scroller) in the autosizing setter so that the view doesn't shrink along with the scroll view when you resize.

How do I use an NSProgressIndicator as the view of an NSToolbarItem and have it show in the customisation sheet?

I have an NSToolbar set up in my app. It was created in IB. One of the toolbar items uses a spinner-style NSProgressIndicator as its view, the rest are images.
When the toolbar's customization sheet is showing, the spinner does not show in the sheet.
I initially thought that this was because the spinner's -displayedWhenStopped was set to NO. That's not the case: if I set it to YES, the spinner shows in the toolbar when active, but doesn't show in either the toolbar or the sheet when stopped.

Resources