Xmas
Christmas is when we I have the most special feeling. The cool air, the snow, the reunion, the church bell ringing, …
(From google)
It ‘s beginning to look a lot like Christmas. First with Xcode
Xmas
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 itsinitWithIcon:message:parentWindow:duration:
-
DVTBezelAlertPanel
is fromDVTKit
. I thought about importing run time header and justextension
it. But I find swizzling in Objective C a much more easier solution
NSVisualEffectView
- It seems that
NSImage
added to the panel ‘sNSVisualEffectView
had ittemplate
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 changetemplate
back to NO afterinit
happens
1 |
- (id)xmas_initWithIcon:(id)icon |
And, Merry Christmas to you and your family