mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-26 00:31:39 +03:00
[UPDATE] Import Details
This commit is contained in:
parent
7930b092c2
commit
b7b43c3fff
@ -12,7 +12,7 @@ filename: LearnObjectiveC.m
|
|||||||
Objective-C is the main programming language used by Apple for the OS X and iOS operating systems and their respective frameworks, Cocoa and Cocoa Touch.
|
Objective-C is the main programming language used by Apple for the OS X and iOS operating systems and their respective frameworks, Cocoa and Cocoa Touch.
|
||||||
It is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.
|
It is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.
|
||||||
|
|
||||||
```cpp
|
```objective-c
|
||||||
// Single-line comments start with //
|
// Single-line comments start with //
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -20,9 +20,15 @@ Multi-line comments look like this.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Imports the Foundation headers with #import
|
// Imports the Foundation headers with #import
|
||||||
|
// Use <> to import global files (in general frameworks)
|
||||||
|
// Use "" to import local files (from project)
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import "MyClass.h"
|
#import "MyClass.h"
|
||||||
|
|
||||||
|
// If you enable modules for iOS >= 7.0 or Mac OSX >= 10.9 projects in
|
||||||
|
// Xcode 5 you can import frameworks like that:
|
||||||
|
@import Foundation;
|
||||||
|
|
||||||
// Your program's entry point is a function called
|
// Your program's entry point is a function called
|
||||||
// main with an integer return type.
|
// main with an integer return type.
|
||||||
int main (int argc, const char * argv[])
|
int main (int argc, const char * argv[])
|
||||||
|
Loading…
Reference in New Issue
Block a user