Adding Code to Medium Articles

It will make them better, promise

Photo by Eric Brehm on Unsplash

Then I discovered that it is all too difficult to read

Code blocks

print ("Hello, World!")
import UIKitclass ViewController: UIViewController {override func viewDidLoad() {super.viewDidLoad()let foo: NSArray = NSArray(array: [5, 6, 7])let bar = foo as? [Int]print(bar?.reduce(0, +))}}

Images of code

Click for Gist

Improving Gists

The best solution

Conclusion

The Twitter contact:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store