MPMoviePlayerController becomes smaller in normal mode after exiting fullscreen - mpmovieplayercontroller

MPMoviePlayerController becomes smaller in normal mode after exiting fullscreen.
In 'MPMoviePlayerDidEnterFullscreenNotification' - following property is set.

Related

Programmatically change initial size of NSWindow

I wish to create a NSWindow with an initial size that is programmatically determined (as parameter to [MyWindowController init:]). My current approach is to call [window setFrame:frame] in windowDidLoad within the window controller, but the problem is that the window flashes briefly at the size specified in the nib file before it changes to its new size. I want to avoid this flash. Is it possible to set the initial size of an NSWindow programmatically?
Switch off "Visible At Launch" of the window and call [MyWindowController showWindow:] after you set the frame.

Strange behaviour of NSShadow for customized NSWindow

I subclass the NSWindow and use [self setHasShadow:YES] to set the shadow for window. But the shadow shows abnormally when:
Move the window a little out of the screen, then resize the window to a larger size, then when I drag back the whole window from outside the screen, I find that system does not draw shadow for those part covered by screen before.
the right part without shadow was covered by screen before
To get full shadow, I must resize the window again to let system redraw the shadow.
So is there a way to avoid this behaviour? Maybe it is more efficient to only the shadow for those parts in screen, but I hope it can redraw automatically when the whole window is in screen.

NSScroller inside a NSScrollView does not change position when resizing the window (in Swift)

I have created a NSView with Interface Builder (Xcode 6.1). The NSView has constraints for each direction. When changing the window-size with the mouse manually, the NSView is getting a new size and the NSScroller gets a new position at the correct right border of the window, as expected.
When I set the window size manually (before it is made visible) with
myTextView.enclosingScrollView!.window!.setFrame(theRect)
or with
myTextView.window!.setFrame(theRect)
Then the window resizes well (as soon as it becomes visible), the NSTextView resizes also but the NSScroller (which is automatically part of the NSTextview and has not been created or modified seperately) does not move but stands in the middle of the ScrollView at its old position. The Text entered in the NSScrollView uses the full size and floats behind the NSScroller, which seams to stand in top of the text.
In the case, the Window is visible before setting the Window Size, then the scroll-view is truncated at the right side or bottom side.
When I change the window manually, after settzing the size and getting this behaviour, the NSScroller jumps to it's right position and the NSTextView is not longer truncated. So changing the Window Size manually does something more that I do programmatically.
What must I do, that the Scroller moves with the NSView, like changing the Size of the Window with the Mouse?
This is a typically problem when calling UI-functions from a background thread.
It can besolved, when calling from main-thread or forcing to called by the main-thread with this command:
dispatch_async(dispatch_get_main_queue())
{
// Place the UI Functions here
}
Please have a look at: Open File Dialog crashes in Swift

iOS8 UIAlertView blinks as it replaces white background with translucent one

I'm seeing a strange behavior of one of my UIAlertViews, which I have not seen before. When shown on iOS8.0.2 it pops into existence with a white background, then it gets translucency effect applied to it. Because I'm showing it over a black background, there's a momentary flash as the background becomes translucent.
Is there a way to disable translucent background for native iOS8 alert views?

Cocoa - Modal Window With Animating NSOpenGLView behind it

I have an NSWindow subclass (GameWindow) containing an NSOpenGLView subclass (GameView).
The app is windowed (does not go fullscreen).
An OpenGL animation in GameView is fired ~30 times a second by a timer.
For presentation reasons, the GameView animation MUST continue regardless of what else is happening in the app. The only time it should stop is in the case of a fatal error.
I need to present various "modal" Cocoa windows (e.g. choose new game, confirm quit, etc.) while the animation in GameWindow continues. Some of these could be sheets, but major ones need to appear as standalone windows (complete with WebViews).
MY QUESTION: how can I display these "dialog" windows such that my app timer continues to fire, my animation continues, but user input to the GameView in the GameWindow is blocked until the "dialog" window is dismissed by the user?
(I need to support Tiger + Leopard at this time).
Have you tried the regular sheet/dialog techniques? They should work fine for this situation. Timers are scheduled as part of the run loop, which doesn't stop when you have a modal sheet or window, so it should be able to continue on rendering in the background while events are blocked.
[NSApp beginSheet:sheetWindow modalForWindow:mainWindow modalDelegate:nil didEndSelector:NULL contextInfo:nil];
(Except fill in your own delegate and end selector if needed.)
If you want to keep the current modal windows (without moving to sheets), you can try scheduling the NSTimer yourself in something besides the default runloop mode (NSDefaultRunLoopMode), which hangs as soon as that runloop stops running.

Resources