Trimming strings in Objective-C / Cocoa
-
returnString = [returnString stringByTrimmingCharactersInSet:
-
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
Very intuitive, huh?
Very intuitive, huh?
Have you seen those iPhone apps with a reload button that switches itself to an animated activity indicator while the reload action is being performed?
Here is how to do that. Place this code on your ViewController:
Seen here.
Almost a year ago I was learning some Cocoa and I decided it will be fun to implement a Cocoa based version of Conway’s Game of Life. Back then I didn’t publish the source code, not for any special reason. So now I have just uploaded it to Google Code. It’s not fully functional, since the last time I worked on it I was creating an structure editor. My idea was to create a library of structures, with drag&drop and import/export options.
If you are interested on working on the project, let me know :)