Objective C Tutorial - Objective-C Tutorial

Objective-C is an object-oriented programming language.

It is the main programming language used by Apple for the OS X and iOS operating systems and their respective APIs, Cocoa and Cocoa Touch.

Example Code

#import <Foundation/Foundation.h>

int main (int argc, const char * argv[])
   NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

   NSLog (@"hello world");
   [pool drain];
   return 0;

Foundation Framework

The following line in the code above include the foundation framework into our code.

#import <Foundation/Foundation.h>

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 VFoundation Framework has libraries and features we can use.

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 VIt includes a list of extended datatypes like NSArray, NSDictionary, NSSet and so on.

Foundation Framework has a set of functions we can use to manipulate files, strings, etc.

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 VWe can also use Foundation Framework to do URL handling, date formatting, data handling, error handling, etc.

File name extension

Objective-C source files use .m成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V as extension.

The following table lists other commonly used filename extensions.

.cC language source file
.cc, .cppC++ language source file
.hHeader file
.mObjective-C source file
.mmObjective-C++ source file
.oObject (compiled) file