Learn Objective-C
Bài đăng này đã không được cập nhật trong 7 năm
- 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.
- Objective-C Environment Setup
- Text Editor
- The GCC Compiler.
- Xcode Xcode is currently available at developer.apple.com/technologies/tools/
- Objective-C Program Structure A Objective-C program basically consists of the following parts:
- Preprocessor Commands
- Interface
- Implementation
- Method
- Variables
- Statements & Expressions
- Comments
- 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
- 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