0

Learn Objective-C

  1. Objective-C Overview 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 applications.
  2. Objective-C Environment Setup
  • Text Editor
  • The GCC Compiler.
  1. Objective-C Program Structure A Objective-C program basically consists of the following parts:
  • Preprocessor Commands
  • Interface
  • Implementation
  • Method
  • Variables
  • Statements & Expressions
  • Comments
  1. Objective-C Basic Syntax
  • Tokens in Objective-C ex: NSLog(@"Hello, World! \n");
  • Semicolons ;
  • Comments
  • Identifiers An Objective-C identifier is a name used to identify a variable, function, or any other user-defined item. An identifier starts with a letter A to Z or a to z or an underscore _ followed by zero or more letters, underscores, and digits (0 to 9).
  • Keywords
  1. Objective-C Data Types The types in Objective-C can be classified as follows:
  • Basic Types: They are arithmetic types and consist of the two types: (a) integer types and (b) floating-point types.
  • Enumerated types: They are again arithmetic types and they are used to define variables that can only be assigned certain discrete integer values throughout the program.
  • The type void: The type specifier void indicates that no value is available.
  • Derived types: They include (a) Pointer types, (b) Array types, (c) Structure types, (d) Union types and (e) Function types.

All rights reserved

Viblo
Hãy đăng ký một tài khoản Viblo để nhận được nhiều bài viết thú vị hơn.
Đăng kí