I am currently programmatically enabling fullscreen in an OS X 10.7+ app, via the techniques described in this apple guide, that uses OpenGL to renderer its views. Is it possible to enable per-frame screen updates during the full screen animation? Currently, it seems like a screenshot is taken before and after fullscreen is entered and there is an automatic alpha fade between the two.
I would like to instead redraw the content at every frame so that there is a smooth fade between the two sizes.
You probably want to look at the Custom Full-Screen Presentation Animations section in NSWindowDelegate documentation
Related
I am developing a 2D video game and trying to implement a good fullscreen extension to the game maker, Clickteam Fusion.
I've tried using SetWindowPos and I can get the window to look the correct size, but then when using the Steam Overlay the overlay is showing offscreen because it is using the initial window size I set in the game maker.
it is clear that the SetWindowPos is just shrinking the window to fit the aspect ratio of my monitor, but the game still is acting like the game is still the initial window size so content gets loaded that is actually outside the display, including Steam Overlay notifications and such.
Is there a better Windows API command I can use to actually adjust a game window?
Does anyone know how to achieve a gaussian blur effect on an UIView in iOS6? Similar to twitter's #music app when the filter menu is open. (the background under the menu becomes blurred)
I wrote a library RWBlurPopover based on GPUImage that can achieve similar gaussian blur effect when presenting a popover. Supports both iPhone and iPad, and runs on iOS 5.1+.
I'm trying to create Magnifying Glass App very similar to build in in OS X (Mountain Lion).
I'm wondering how can I acheive this effect, using which frameworks?
What do you think, could it be a custom cursor? The image displayed in this rectange is just zoomed portion of backgound-spapped screen? I think that kind of implementation can run sluggish, and it could be difficult to change cursor whole System not only in "zooming" application.
Or maby it is use some quartz functionality is not known for me :)
I found one thing tha is interesting about Apples implementation (build in OS X), when I enter in zoom-mode and do a ScreenShot using Ctrl+Cmd+4 and next Space the image captured is like that:
With out any content of screen only the border of zooming area. So it tells me that it is some kind of transparent window abowe the screen but it is not taking over the focus.
Have you got any idea how to do that ?
I want to implement an animation which is like the sync animation of evernote app on Max OS X.
The button looks like:
When the animation runs, only is the white arrow rotating.
I tried to use Core Animation, and the steps are following:
1 I dragged a NSButton to the tool bar and set it to an outlet aBtn. I set the blue blackground image to the aBtn.
2 I created a CALayer instance variable aLayer and add it to the aBtn. So it can look like the button above.
3 when aBtn was clicked, I add the rotation animation the aLayer. It run perfectly well.
The problem is when I want to customize the tool bar, the aBtn shown in the tool bar palette didn't have the aLayer and only had the blue background image.
Then I tried to find the event or notification for the showing or closing of the tool bar palette. As a result I can reset the image of the aBtn before the tool bar palette was shown or hidden.However, I couldn't be notified when the tool bar palette was closed.
Could any one give any suggestion?
If you have good idea about how to implement this animation, please let me know.
Thanks!
I create a gif to store the animation, and create an NSImageView for the gif. Then I use -[NSToolBarItem setView:].
Using gif is an easier way than implementing it with Core Animation.
Is there a way to control the brightness of the OS X desktop programmatically using Cocoa or Core Animation?
Create a semi-transparent full-screen view behind your main window.
In case you were actually interested in doing a fade-out or fade-in of the whole screen, here is a link describing how to do that.
The linked document contains examples for how to fade all displays (or a single display) to black (you can change the color), capture the display (where you can display what you'd like), and then fade back. This uses CGAcquireDisplayFadeReservation() mentioned in the comment to my other answer.
Is this more like what you were looking for?