XEBox - a collection of XCode source editor extensions

In the past of last month, I made several more Xcode source editor extensions to scratch my own itches. I packed them together to a new project called XEBox.

Beside Import For Me, following extensions are added:

String to NSLocalizedString

Type a quoted string and turn it into the form of: NSLocalizedString(“string”, comment:”string”)

String to NSLocalizedString

Turn to optional binding

This one turns an “let” assignment into an optional binding.

Turn to optional binding

Move up into braces

This one moves the selected codes up into the nearest braces.

Move up into braces

Check it out at XEBox.

Import For Me - a simple Xcode source editor extension

I just built a little Xcode source editor extension to add an import line without jumping to the head of file.

Xcode extension

Sometime when you are busy at typing some coolest swift code in the world but find you need to import a missing module, you have to jump to the head of file, import it and lose yourself in no where.

This little extension will save you. Just typing the module name in a new line and launch the extension, the module will be automatically imported to the head of file and leave you at where you are.

It works with swift file. Have a check at robin/importForMe

2048 in swift playground

I composed a 2048 game with less than 400 lines of code in swift playground a couple of months ago. I just wanted to see how serious Swift Playground for iOS 10 could be. I wrote most of the code in a coffee bar with my iPad Pro. Dash for iPad was my best friend especially when I did not have Xcode along with me. It reminded me when I was in my teenage and typed lines of BASIC into my Apple II clone just to play Snake.

Now Swift Playground has been officially released with iOS 10 and I just updated my 2048 to the latest version of Swift 3.0. If you like, you can check it out and have some fun with numbers.