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. Android:手把手教你打造可缩放移动的ImageView(下)

    在上一篇Android:手把手教你打造可缩放移动的ImageView最后提出了一个注意点:当自定义的MatrixImageView如ViewPager.ListView等带有滑动效果的ViewGrou ...

  2. JavaScript中的坑

    内容:关于JavaScript中的一些蛋疼的问题以及面试笔试中常见的一些坑爹套路总结 此部分内容持续总结完善中... 1.undefined和null的区别 null: Null类型,代表空值,代表一 ...

  3. 生存分析与R

    生存分析与R 2018年05月19日 19:55:06 走在码农路上的医学狗 阅读数:4399更多 个人分类: R语言   版权声明:本文为博主原创文章,未经博主允许不得转载. https://blo ...

  4. 折腾了几个小时,分享下zendstudio10的git使用

    今天打开zend10,发现新建项目的地方有 from git,from github,就试了试,发现可以导出,也可以commit,但是没办法push. 就百度百度,发现zendstudio10的git ...

  5. sqoop1 与sqoop2的对比

    Sqoop是一款开源的工具,主要用于在Hadoop和传统的数据库(mysql.postgresql等)进行数据的传递,可以将一个关系型数据库(例如:MySQL.Oracle.Postgres等)中的数 ...

  6. spring security 学习文档

    web service Prepared by:   Sea                                                                       ...

  7. leetcode345

    public class Solution { public string ReverseVowels(string s) { var str = s.ToList(); var Vowels = n ...

  8. WP8.1 控件默认字体颜色 配置文件位置

    C:\Program Files (x86)\Windows Phone Kits\8.1\Include\abi\Xaml\Design\generic.xaml 可在App.xaml文件中over ...

  9. DOM对象模型

  10. Jenkins服务器磁盘空间爆满问题解决

    现象: 从根目录开始,使用du -h -x --max-depth=1  查看哪个目录占用过高,打算对于过高目录中的内容适当删减腾出一些空间 通过追踪查询,发现是jenkins的构建纪录未清理,而且最 ...