Thank you for the great tutorial!
Do you have an update of this for Swift 4 and XCode 9? The code for loading and displaying the second view controller
isn’t compatible with Swift 4…
Thanks…
Sorry this article won’t be updated anytime soon but luckily the swift fix items in Xcode do a perfect job on this code (I just checked) . Alternatively use Edit > Convert > To Current Swift Syntax on the final project to see what needs to be changed.
Most of the conversions are to do with storyboard identifiers so
"Word Count Window Controller"
becomes
NSStoryboard.SceneIdentifier(rawValue: "Word Count Window Controller")
you’ll need to change
dynamic var wordCount = 0
to @objc dynamic var wordCount = 0
in a couple of places
and
NSApplication.shared()
becomes NSApplication.shared
and thats about the size of it.
But Xcode will do all the work if you want it to. Just click the red dots in the source editor to reveal the fix item.
Thanks for reading.
Thank you Warren, appreciate it.
This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]