# iOS 开发 深入浅出Runtime运行时之官方指南翻译--runtime介绍

## 官方指南结构图

runtime官方指南连接

Introduction

The Objective-C language defers as many decisions as it can from compile time and link time to runtime. Whenever possible, it does things dynamically. This means that the language requires not just a compiler, but also a runtime system to execute the compiled code. The runtime system acts as a kind of operating system for the Objective-C language; it’s what makes the language work.

This document looks at the NSObject class and how Objective-C programs interact with the runtime system. In particular, it examines the paradigms for dynamically loading new classes at runtime, and forwarding messages to other objects. It also provides information about how you can find information about objects while your program is running.

You should read this document to gain an understanding of how the Objective-C runtime system works and how you can take advantage of it. Typically, though, there should be little reason for you to need to know and understand this material to write a Cocoa application.

## runtime介绍

objective - c语言尽可能把编译和链接的决定推迟到运行时处理。只要有可能,它就会动态地处理一些事情。这意味着objective - c语言需要的不仅仅是一个编译器,也需要一个运行时系统来执行编译后的代码。运行时系统作为objective - c语言的一种操作系统,这就是使objective - c语言动态的去工作。

Organization of This Document

This document has the following chapters:

Runtime Versions and Platforms
Interacting with the Runtime
Messaging
Dynamic Method Resolution
Message Forwarding
Type Encodings
Declared Properties

• 运行时版本和平台
• 与运行时交互
• 消息传递
• 动态方法处理
• 消息转发
See Also

Objective-C Runtime Reference describes the data structures and functions of the Objective-C runtime support library. Your programs can use these interfaces to interact with the Objective-C runtime system. For example, you can add classes or methods, or obtain a list of all class definitions for loaded classes.

Programming with Objective-C describes the Objective-C language.

Objective-C Release Notes describes some of the changes in the Objective-C runtime in recent releases of OS X.

objective - c运行时引用描述了数据结构和函数的objective - c运行时库的支持。你的程序可以使用这些接口与objective - c运行时系统交互。例如,您可以添加的类或方法,或获取加载类的所有类定义的列表。

objective - c描述了objective - c编程语言。

objective - c版本注释描述一些objective - c运行时的变化在最近版本的OS X。

1. OC与运行时交互.
2. 消息发送(传递)机制.
3. 动态方法处理机制.
4. 消息转发机制.

• 广告
• 抄袭
• 版权
• 政治
• 色情
• 无意义
• 其他

120