Tag Archives: cocoa

Date Formatting in Objective-C (Cocoa Framework)

Date Formatting in Objective-C //Format Date NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat: @"yyyy-MM-dd HH:mm:ss zzz"]; // 2009-02-01 19:50:41 PST NSString *dateString = [dateFormat stringFromDate: [scoreData objectForKey: @"date"]]; http://codesnippets.joyent.com/posts/show/12740

Posted in Objective-C | Also tagged , , , , , , , , , , | Leave a comment

Simple alert box on iPhone

Simple alert box on iPhone UIAlertView *someError = [[UIAlertView alloc] initWithTitle: @”Network error” message: @”Error sending your info to the server” delegate: self cancelButtonTitle: @”Ok” otherButtonTitles: nil]; [someError show]; [someError release]; http://codesnippets.joyent.com/posts/show/12744

Posted in Objective-C | Also tagged , , , , , , , , | Leave a comment

(Objective-C) Basic NSTableView Control Functions (Cocoa Framework)

Basic NSTableView Control Functions

Posted in Objective-C | Also tagged , , , , , , , | Leave a comment

Logging output in Objective-C (Cocoa Framework)

NSLog can be used for outputting messages to the console for debugging purposes. – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // Add the tab bar controller’s view to the window and display. [self.window addSubview:tabBarController.view]; [self.window makeKeyAndVisible]; NSLog(@”Application didFinishLaunchingWithOptions”); return YES; } Output: NSLog also supports format specifiers such [...]

Posted in Objective-C | Also tagged , , , , , | Leave a comment