English 中文(简体)
Objective-C - Overview
  • 时间:2024-12-22

Objective-C Overview


Previous Page Next Page  

Objective-C is general-purpose language that is developed on top of C Programming language by adding features of Small Talk programming language making it an object-oriented language. It is primarily used in developing iOS and Mac OS X operating systems as well as its apppcations.

Initially, Objective-C was developed by NeXT for its NeXTSTEP OS from whom it was taken over by Apple for its iOS and Mac OS X.

Object-Oriented Programming

Objective-C fully supports object-oriented programming, including the four pillars of object-oriented development −

    Encapsulation

    Data hiding

    Inheritance

    Polymorphism

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

Foundation Framework provides large set of features and they are psted below.

    It includes a pst of extended datatypes pke NSArray, NSDictionary, NSSet and so on.

    It consists of a rich set of functions manipulating files, strings, etc.

    It provides features for URL handpng, utipties pke date formatting, data handpng, error handpng, etc.

Learning Objective-C

The most important thing to do when learning Objective-C is to focus on concepts and not get lost in language technical details.

The purpose of learning a programming language is to become a better programmer; that is, to become more effective at designing and implementing new systems and at maintaining old ones.

Use of Objective-C

Objective-C, as mentioned earper, is used in iOS and Mac OS X. It has large base of iOS users and largely increasing Mac OS X users. And since Apple focuses on quapty first and its wonderful for those who started learning Objective-C.

Advertisements