Main menu:

Site search


September 2019
« Oct    




Archive for 'CoCoa'

Going fullscreen in Cocoa - Part III

Time for a completely different approach. This time when I start the fade out to black, I create a borderless window with the same dimensions as the screen I want to fade. This window has a black background but with an initial alpha value of 0.0 (so it’s not visible yet). Let’s call this a [...]

Going fullscreen in Cocoa - Part II

In part I I described the the easiest solution of going full screen using the fade effect I wanted. However it had a couple of problems:

The enterFullScreenMode and exitFullScreenMode methods as they are implemented in Leopard (OS X 10.5) hide the dock and menubar for you but no means to show the menubar again when [...]

Going fullscreen in Cocoa - Part I

For a project I’m working on I thought it would be nice to give the user the possibility to use the full screen (e.g. full screen editing in iPhoto, slideshow in Preview, …). As usual this turned out to be a bit less evident than I thought it would be.
The effect I wanted to achieve [...]

Layer Backed Views and improving drawing speed

A few evenings ago I watched the “Session 401 - Leveraging Cocoa’s Layer-Backed Views” from WWDC 2008 again. Watching it, I concluded that just adding this line of code for every NSView could give a nice speed boost in drawing the content of the NSView.

@import “/blog/wp-content/themes/wp-andreas01/coloring-halloween.css”;

[self setWantsLayer:YES];

To find out, I wrote a simple test application [...]

Switching spelling languages

If you’re like me, then you probably write one email in language X and another one in language Y and you’re getting tired of always switching the spell checker language to stop every word being underlined in red. That means pressing command + shift + “:”, selecting the correct language and then close the spell [...]

Shared/Dynamic libraries in OS X

A while ago I struggled with the problem of building a shared library (also known as dynamic library), let it link to a GUI build on top of it and let it be part of a clickable application. There doesn’t seems to be much information on the Internet, so here’s my story on how I [...]

A variation on NSLog()

Using NSLog() is probably the easiest and most used [first line] debuggingtool. However, the output of NSLog() was not really to my liking and I thought it could be made more useful. The output of:

NSLog(@”%s : generated = %d”, _cmd, generated);
looks typically like this:
2008-11-09 19:00:41.223 CCLog[219:10b] generate: : generated = 88
It shows the date and [...]

Cocoa pronunciation

Probably a weird post to start this blog with, but during my visit to WWDC ‘08 and listening to a few cocoa related podcasts it dawned to me that I always wrongly pronounced cocoa (probably due to my native language which seems to prefer to speak out both the ‘o’ and ‘a’ vowels). Thanks to [...]