swift

How DelegateProxy works in RxSwift?

DelegateProxy is a core feature in Rxswift to wrap the return value from original delegate to observable sequence. So it's important to discover how it works in RxSwift. Under the hood, message forwarding, a feature in Objective-C, plays a role in forwarding message from proxy to real delegate. You should have some basic knowledges about Objective-C Runtime before you go deeper. You can learn that in this post (Chinese version): Objective-C Runtime详解.

2020-03-12 / 17 min read

Objective-C Runtime详解

最近在学习RxSwift,对于DelegateProxy如何进行消息转发问题比较感兴趣,所以仔细阅读了源码,发现其在底层利用了Objective-C Runtime的特性实现消息转发,因此在网上找到了这一系列的文章。
这篇文章大部分内容转自南峰子的技术博客。由于年代久远的关系,其部分图片已经404,遂在这篇文章中进行补齐,同时对于文中描述的一些不是很清楚的内容加入了我的理解。
实际上该系列文章下分六篇独立文章,在我的版本中将单独的文章予以合并以图后续查阅方便。

2020-03-06 / 65 min read

Swift Usage

This article is for recording the resources which I collected together about how to gracefully use swift, an language released by Apple in 2014. Hopefully this post will help you.

2020-01-03 / 3 min read