1. ObjC的基础

2. ObjC2.0中的编译指令

3. ObjC Runtime

4. ObjC Object Model

5. ObjC的新语法

6. FQA

1. ObjC的基础

2. ObjC2.0中的编译指令

http://www.learn-cocos2d.com/2011/10/complete-list-objectivec-20-compiler-directives/

http://developer.apple.com/library/mac/#releasenotes/Cocoa/RN-ObjectiveC/index.html

3. ObjC Runtime

3.1 class method 中的self 和 instance method中的self不同点在哪?

Within the body of a class method, self refers to the class object itself.

参见: https://developer.apple.com/library/ios/documentation/general/conceptual/DevPedia-CocoaCore/ClassMethod.html

3.2 metaclass

http://www.cocoawithlove.com/2010/01/what-is-meta-class-in-objective-c.html

Class and metaclass:

http://www.sealiesoftware.com/blog/archive/2009/04/14/objc_explain_Classes_and_metaclasses.html

http://resources.infosecinstitute.com/ios-application-security-part-3-understanding-the-objective-c-runtime/

4. ObjC的新语法

4.1 属性只需要声明(使用property指令), 而不需要@synthesize指令,那么会发生什么?

@interface Context : NSObject

@property (nonatomic, strong) NSMutableString *text;

4.2 @import

例如:

@import UIKit

4.X Modern Objective-C: WWDC 2012 Session 405 (TODO)

5. QA

5.1 NSCopying NSMutableCopying

Implement "- (id)copyWithZone:(NSZone *)zone"  for immutalbe object.

ARC:

- (id) copyWithZone:(NSZone *)zone { return self; }

MRC:

-(id) copyWithZone:(NSZone*)zone { return[self retain]; }

- (id)mutableCopyWithZone:(NSZone *)zone

Ref:

A. POP, POPAnimatableProperty类

B. http://stackoverflow.com/questions/9127198/objective-c-immutable-object-copywithzone-arc-compatible-realization

5.2

NS_RETURNS_RETAINED

NS_RETURNS_NOT_RETAINED

CF_RETURNS_RETAINED

CF_RETURNS_NOT_RETAINED

NS_RELEASES_ARGUMENT

CF_RELEASES_ARGUMENT

Ref

A. http://clang-analyzer.llvm.org/annotations.html

B. http://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-object-operands-retained-return-values

5.3

NSObject的接口

"+ (id)allocWithZone:(struct _NSZone *)zone" 在子类该如何实现呢,该接口在ObjC中是什么作用?

iOS.ObjC.Basic-Knowledge的更多相关文章

  1. iOS进行Basic认证与NTLM认证

    一.iOS进行Basic认证 只需要在NSMutableURLRequest的Header中添加认证所需的Username和password. NSMutableURLRequest *webReq ...

  2. NLP related basic knowledge with deep learning methods

    NLP related basic knowledge with deep learning methods  2017-06-22   First things first >>> ...

  3. Python基础知识(Basic knowledge)

    Python基础知识(Basic knowledge) 1.认识Python&基础环境搭建 2.Python基础(上) 3.Python基础(中) 4.Python基础(下) 5.Python ...

  4. iOS.ObjC.Compiler.Directives

    Objective-C Compiler Directives @dynamic "You use the @dynamic keyword to tell the compiler tha ...

  5. 计算机基础知识 一 Basic knowledge of computers One

    计算机硬件由CPU(Central Processing Unit).存储器.输入设备.输出设备组成. CPU通常由控制单元(控制器)和算数逻辑单元(运算器)组成. 运算器:负责进行算数运算和逻辑运算 ...

  6. iOS Objc Runtime 教程+实例Demo

    样例Demo 欢迎给我star!我会继续分享的. 概述 Objc Runtime使得C具有了面向对象能力,在程序执行时创建,检查.改动类.对象和它们的方法.Runtime是C和汇编编写的,这里http ...

  7. Android Studio accelerator key(shortcut)& Basic knowledge

    shift + F6 重构(选文件,ok->下面的控制台,do refactor option + return 快速修复 Activity@Extra() Intent: @FragmentA ...

  8. NoSql basic knowledge

    The big picture to keep in mind first is: There are lots of articles and resources out there: http:/ ...

  9. [Tango] Basic Knowledge

    Project Tango类设备能够给开发者在哪些领域带来机会. 室内导航*:室内GPS信号的缺失,使得Project Tango设备会成为室内导航重要应用场景之一.有了它,你就不会在不熟悉的室内商场 ...

随机推荐

  1. sencha touch在华为emotion ui 2.0自带浏览器中圆角溢出的bug

    在华为emotion ui 2.0自带的浏览器中,给部分组件设置了圆角后会发现背景仍然是方的,内部边框是圆的, 对于这种bug, 只需在对应的设置圆角的css样式中加入 background-clip ...

  2. MAN 手册各章节功能介绍及快捷键键位整理

    前言   Man 手册页(Manua pages ,缩写man page) 是在linux操作系统在线软件文档的一种普遍形式.内容包括计算机程序库和系统调用等命令的帮助手册. 手册页是用troff排版 ...

  3. 求m-n之间数字的和

    unction sum(m,n){         var sum = 0;         if(m>n){                 for(var i=n; i<=m; i++ ...

  4. filter vs servlet

    主要从如下四个方面介绍他们之间的区别:                 1.概念.                 2.生命周期.                 3.职责. 4.执行过程. 一.概念 ...

  5. HTML5 浏览器接收的常用 content-type

    <1> 常见的设置方法 response.setHeader("content-type", 'text/html'); <2> 浏览器接收的常用 cont ...

  6. node 把前台传来的base64码转成图片存放

    最近做个人网站头像修改用到了,在做头像修改,先做了一个图片切割,只需要上传你选中部分, 如图 这种需求 应该还是会遇到的, http://pan.baidu.com/s/1boVkn1t 这是裁剪图片 ...

  7. oracle imp dmp

    windows>cmd> imp userid=用户名/密码@orcl file=d:\nc60.dmp full=y imp userid=SYSTEM/password@orcl fi ...

  8. const对象,指向const对象的指针 和 const 指针

    const对象: const对象声明时必须赋初值,该值在编译阶段确定,不可在程序中修改. const修饰符既可放在类型名前也可放在类型名后,通常放在类型名前.不过放在类型名后易于理解. const i ...

  9. UGUI双击事件

    经测试在Android.ios平台下无效 using UnityEngine; using UnityEngine.EventSystems; using System.Collections; us ...

  10. Ibatis/Mybatis模糊查询

    Ibatis/Mybatis模糊查询 根据网络内容整理 Ibatis中 使用$代替#.此种方法就是去掉了类型检查,使用字符串连接,不过可能会有sql注入风险. Sql代码 select * from ...