Xmas

Khoa Pham
Indie Goodies
Published in
1 min readOct 22, 2016

--

Christmas is when we I have the most special feeling. The cool air, the snow, the reunion, the church bell ringing, …

It ‘s beginning to look a lot like Christmas. First with Xcode
Xmas is an Xcode plugin that shows Xmas picture along with wishing message whenever a build succeeds

How it works

Swift

- Try to do much of the job in Swift as possible

DVTKit

- Xcode uses DVTBezelAlertPanel to display alert. So we swizzle its initWithIcon:message:parentWindow:duration:
- DVTBezelAlertPanel is from DVTKit. I thought about importing run time header and just `extension` it. But I find swizzling in Objective C a much more easier solution

NSVisualEffectView

- It seems that `NSImage` added to the panel ‘s `NSVisualEffectView` had it `template` set to YES again, hence causing the image into template color with the panel background color
- This happens in the `init` method. So we must change `template` back to NO after `init` happens

--

--