• Blog
  • Categories
    • Cabin
    • General
    • Media Center
    • Off-roading
    • RV
    • Software
      • App Store
      • Benchmarks
      • Computer Science
      • iOS
      • Objective-C
      • OS X
      • PHP
      • Swift
      • tvOS
      • Web
    • Weather
  • Apps
    • Portfolio
    • Studio Pro
    • Sun & Moon
  • Photography

Projects

Remote Working, iOS, Mac OS X, and more

Swift

GCD Sugar for Swift →

Async sugar looks like this:

Async.background {
println("This is run on the background queue")
}.main {
println("This is run on the main queue, after the previous block")
}

Instead of the familiar syntax for GCD:

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), {
    println("This is run on the background queue")

        dispatch_async(dispatch_get_main_queue(), {
            println("This is run on the main queue, after the previous block")
        })
})
  • Newer Posts
  • 1
  • …
  • 91
  • 92
  • 93
  • 94
  • 95
  • …
  • 112
  • Older Posts

Copyright 2026 Ryan Britton