Craig Grummitt – Before I forget

Discoveries in Swift and iOS development.

Multi line SKLabels in Swift

·

Updated for Swift 3!

Sometimes Apple seems to have made some pretty obvious oversights – a SKLabel without multi-line capability? Strange.

I’ve had a look at some third party solutions and each seemed to have their own limitations. Here is my take on a multiline SKLabel in Swift (doesn’t account for \n but does account for word wrapping)

https://gist.github.com/craiggrummitt/03bfa93c07e247ee9358


Comments

One response to “Multi line SKLabels in Swift”

  1. Dan Clark (@danclark1820) Avatar

    Thank you so much super helpful. Saved me a huge head ache from having to figure this out myself.

    I also needed
    required init(coder: NSCoder) {
    fatalError(“NSCoding not supported”)
    }

Leave a Reply

Your email address will not be published. Required fields are marked *