Objective-C Study Notes (1), objective-c Study Notes
How to master a high-level programming language:(Objective-C here)
Bottom-layer thinking: down, how to think about the process of running the program from the perspective of the bottom-layer machine.
Focus on language structure, compilation and conversion, memory model, and runtime Mechanism
Abstract thinking: upward thinking, when the software complexity is high, the style needs to be abstracted as a code program.
Focus on object-oriented, component encapsulation, design mode, and architecture Mode
"Time and Space Man" Trinity analysis method:
Time: complie-time VS run-time: time node division for distinguishing Compilation time and running time
Space: stack VS heap must distinguish stack from heap because it determines the life cycle of the program.
Character: programmer VS compiler/runtime/framework distinguishes which codes are written by the compiler, runtime, and framework.
Two development methods:
Compiler (Clang or GCC) Command Line
Clang-fobjc-arc HelloWorld. m
Xcode Project
Development by project
Mandatory document:
Programming with Objective-C:
Https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/
IOS zone:
Https://developer.apple.com/library/ios/navigation/
Apple Developer Conference WWDC
Exercise:
1. Compile and print HelloWorld with Clang
* 1 Write HelloWorld. m
* 2 enter the file folder on the terminal and enter clang-fobjc-arc HelloWorld. m-o Hello
* 3 generate the Hello file after compilation and run it with./Hello.
2. Compile and print HelloWorld with XCode