By mere chance I’ve come across the following list of Objective C tutorials on YouTube. (The author also has a couple of introductory Swift tutorials and seems to be continuing his tutorials in Swift, though they have not been updated recently, as far as I can see. He has, as far as I can see, […]

Xcode 8.0, Swift 3, OSX 10.11 The following is a good example of creating your own operators. In the two years since first writing this, I have not found an actual use for this, but it appears to be a common operator in Ruby, and has been implemented several times in Swift. My example code […]

(macOS 10.11; Xcode 8.0) This post deals with colouring buttons. Some of the techniques described are against Apple’s InterfaceDesign guidelines; others are simply against the rules of good taste. This post is an exploration of what is possible and will provide a handy reference in the future if I ever think ‘oh, I wish I […]

Terry Pratchett uses the term ‘Extelligence’ for the habit of storing information outside oneself. This Blog mainly exists to stand on the shoulders of giants and to store information in an accessible manner so that once I have solved a problem, I do not have to solve it again. ‘And because WordPress is a decent […]

Xcode 8, macOS 10.11 (I will test this with 10.12. Settings mostly borrowed from https://littlebitesofcocoa.com/89-custom-xcode-file-templates. Credit for working this out mainly goes to them, but I wanted to add a few additional observations. Also, I’m working on macOS rather than iOS.) When you are using certain classes a lot in your projects, having them as […]

(This post is based on https://www.raywenderlich.com/98178/os-x-tutorial-menus-popovers-menu-bar-apps), expanded and updated for Swift 3. This seems to be the only tutorial in town – at least I’ve seen a couple of other tutorials that were suspiciously similar, right down to the architecture and the location of the event monitoring code.) Xcode 8.0, macOS 10.11 1) Start simple: […]

macOS 10.11/Xcode 8.0 Sometimes, you want items to have serial numbers. This is, to me, the neatest way of creating such unique identifiers – simply use a static variable, and assign it to each new item before incrementing it in the initialiser. class HazSerialNumber { static var serialCounter: Int = 1 let serial: Int init(){ […]