乱七八糟

 

1.Category 会覆盖掉原来类里的方法吗?

答案是会的,将category生成对应的cpp文件会看到它的结构,

struct _category_t {
const char *name;
struct _class_t *cls;
const struct _method_list_t *instance_methods;
const struct _method_list_t *class_methods;
const struct _protocol_list_t *protocols;
const struct _prop_list_t *properties;
};

 实例方法列表,类方法列表,协议列表,属性列表,但是没有实例变量列表。即使添加了属性也只是添加了setter和 getter方法。

系统在运行时将category对应的实例方法、类方法等都插入到了原来类或元类的方法列表中去了,而且是放在前边,所以通过isa指针去查找方法的话,优先是调用category中的。所以是category会覆盖掉原来类实现的方法。

 

2. TCP的三次握手

syn - synchronous 联机的意思

ack - acknowledgement - 确认的意思

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值