Victor S. Wang
user

Victor S. Wang

My Blog


Featured

Xcode

Build your own Xcode 8 Source Editor Extension

Posted on .

Since WWDC 2016, I was so excited about the announcement of the new Xcode source editor extension released in Xcode 8. Some of you may know I once wrote another Xcode plugin called VWInstantRun, an plugin made with some runtime hacks, a.k.a. old/unofficial way.

So naturally I’d love to port this plugin to the brand new Xcode source editor extension. I gave a try this weekend and I failed to implement InstantRun with the new approach. Basically there is two major limit to achieve it:

Featured

Swift

用 struct 和 enum 来构建你的整套 UI

Posted on .

之前分享过一次 LeeGo,有同学说不是很明白什么时候用,以及具体有什么好处。我觉得有必要再安利一次,好处往简单了说就一句话,可以让大家「脱离 UIView 做 UI 开发」。还写过另一篇文章讨论过为什么。其他的诸如声明式,高可用性UI,可服务器端远程更新等等一切好处其实都或多或少是源于这一条。

Featured

Swift

Put your whole UI into struct & enum with LeeGo

Posted on .

We all know that MVC pattern have some serious problems when dealing with a complex iOS project. Fortunately there are also a bunch of approaches that aim to fix the problems, most of them mainly address the Controller part, such as MVP, MVVM, MVSM or VIPER. But there is barely a thing which address the View part. Is that means we just run out of all the problems in the View part ?

Featured

Swift

Build UI without UIView

Posted on .

Encouraged by John Sundell’s great video at Scale, I’ve decided to write more about component driven UI, about why we should and how to do it (for iOS). In this post, I’ll try to focus on talking only the very basic idea.

Featured

Swift

Two weird things about protocol, extension and subclass in Swift

Posted on .

As I wrote a post about method dispatch in Swift yesterday, in the meantime, I found there are two weird problems.

Tested with Swift 2.1 & Xcode 7.2

The first one is the behaviors of overriding extension method are weird. It seems that we can only override the methods in extension which is full compatible with Objective-C. Otherwise we’ll have an compile error: Declaration from extensions cannot be overridden yet