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)

iOS development with Swift - book: https://manning.com/books/ios-development-with-swift video course: https://www.manning.com/livevideo/ios-development-with-swift-lv

Tagged with:
Posted in Swift
One comment on “Multi line SKLabels in Swift
  1. 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

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: