Month: October 2016

I have this on my iPhone 6 Plus and it looks pretty nice for both home and lock screen.  Enjoy. 

Here it is in Swift 3, it’s a little different. I tried to use hypotf but it didn’t like CGFloat subtraction. override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { if touches.first != nil { let pointCenter = CGPoint(x: self.view.frame.width …

Swift 3: Distance between two CGPoints Read More »

Coming from iOS to macOS, I wanted to read keyboard input in my macOS application. Not from a textfield but rather from the window itself. I thought this would be an easy task. After some trial and error, Googling, and …

iOS to macOS: Reading keyboard input Read More »

I declare this day a fine day having discovered non-Objective-C protocols! No more @objc protocol usage. Now it’s as simple as something like this: protocol myDelegate { func report(info:String) } class MyClass: NSObject { var delegate:myDelegate? var serviceType = “hephaestus” …

Protocol/delegates in Swift 3.0 Read More »

Tagged with: