This was my first rotation animation few year before with iDMG (my first Cocoa application) it is very simple but is my favourite. Of course this rotation is hardly used since there is no way to define the anchor point like core animation.

Here is the code:
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:1.0f];
[[arrow animator] setFrameRotation:90];
[NSAnimationContext endGrouping];
Well again, part of DockSpaces requires different code for 10.5 Leopard and different for 10.6 Snow Leopard. The following code can distinguish the operating system and do your work accordingly.
SInt32 version = 0;
Gestalt( gestaltSystemVersion, &version );
BOOL snowleopard = ( version >= 0x1060 );
BOOL leopard = ( version >= 0x1050 );
if ( snowleopard ){
// some code
}
else if ( leopard ){
// some other code
}
Hi, long time no post 
I been quite bust with university and work therefore not that much effort on the blog.
DockSpaces needed a direct call to open the Dock Preferences within System Preferences.

So here is something quite simple but in case you need it…
-(IBAction)launchPreferences:(id)sender
{
NSArray *paths = NSSearchPathForDirectoriesInDomains
(NSLibraryDirectory, NSSystemDomainMask, NO);
[[NSWorkspace sharedWorkspace] openFile:[[paths objectAtIndex:0]
stringByAppendingPathComponent:@"PreferencePanes/Dock.prefPane"]];
}
Hi everyone…
This post it won’t be very helpful for most of you, but it is extremely useful for me. 
Currently I live in accommodation flat in London and for some annoying reason every room has a weekly cap of 14Gb… Therefore, I usually reach the limit quite fast so I had to do something!!!

Solution: A Bandwidth limiter that limits my connection to 64kbit/s.
Grab the application from here and the source code here.
Click here to read more »

The following example is the simplest way to validate a textfield. In this case we have a textfield and the only characters allowed are:
[0123456789QWERTYUIOPLKJHGFDSAZXCVBNMqwertyuioplkjhgfdsazxcvbnm ];
I think in any application with user input you will need some sort of validation
You can grab the code TextFormatter

Hi, recently I have been working on this infix to postfix notation converter in C++ for my data structures module at the university. I also discovered that Objective-C does not have templates like C++ to create an abstract data type.
Anyway, the infix to postfix requires the use of a Stack and as you can see here there is a way to implement this behaviour using a NSMutableArray.
Grab the source code - InfixToPostfix – The code is based on this java implementation. Click here to read more »

In this post I will introduce you my preferences window approach
For sure is not the only one you will come across, but is definitely one of the easiest ways. In this case the toolbar is created with Interface Builder so is compatible only with 10.5 or later. (less code)
So let’s start…
STEP #1 Preferences window controller
Click here to read more »
If you close a window in a Cocoa app there are several ways to bring the window up again and that depends on the developer. Anyway, the most common is to click on the Dock icon.
In order to do that the method is the following:
- (BOOL)applicationShouldHandleReopen:(NSApplication*)theApplication
hasVisibleWindows:(BOOL)flag{
[mainWindow orderFront:nil];
return TRUE;
}
Of-course this method is called in the Application delegate class.
Following the previous post that I explained you why you are encouraged to separate your nib/xib files now I am going to explain you how to do it.
STEP #1 The window controller
First we need to create the window controller (NSWindowController)
The header file AboutWindowController.h
#import <cocoa /Cocoa.h>
@interface AboutWindowController : NSWindowController { }
@end</cocoa>
And the implementation file AboutWindowController.m
#import "AboutWindowController.h"
@implementation AboutWindowController
- (id)init {
if ((self = [super initWithWindow:NULL]) != NULL) {}
return self;
}
- (NSString *)windowNibName {
return NSStringFromClass([self class]);
// This determines the name of the Xib file, In this case the name
// of the class, so we need to create the AboutWindowController.xib
}
@end
STEP #2 Create the Xib
Now, with Interface Builder we need to add a new Application Xib and name it “AboutWindowController”. Step 1 Step 2
Click here to read more »

In case you are wondering why you should separate your nibs/xibs in your project you are in the right post. The Apple resource programming guide explains everything in detail but we are after the following paragraph:
“In the main nib file for a Mac OS X application, consider storing only the application menu bar and an optional application delegate object in the nib file. Avoid including any windows or user-interface elements that will not be used until after the application has launched. Instead, place those resources in separate nib files and load them as needed after launch.” (link)
Having everything in one nib is in general a bad idea. The reason is that you are instantiating everything at once when the application is launching. Of-course in a tiny application you wont even notice a difference in the performance neither in the way you organise the project but when the project is expected to be big you are encouraged to separate it.
For example if you have everything in one nib/xib file you are instantiating the preferences window, about window and other windows and controllers that you may not using.
You should be using multiple nibs.