Tag Archives: osx

Asynchronous HTTP POST requests in Objective-C (Cocoa Framework)

The snippets below contain a header file and an Objective-C class to send HTTP POST requests.

Posted in Objective-C | Also tagged , , , , , , | 1 Comment

Instantiation in Objective-C

Instantiation in Objective-C consists of allocating memory for the instance and calling init. NSString* foo = [[NSString alloc] init];

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