How to do it...

To see GCD in action, perform the following steps:

  1. Create a new Xcode project with the Single View Application template and with the name GCDDemo.
  2. Open Main.storyboard and add an image view with the following constraints in the view controller:
      ImageView.leading = Superview.leading = 
      ImageView.width = Superview.width * 0.5 
      ImageView.height = Imageview.width 
  1. In the same way, add 3 more image views to be like a grid:
  1. Now let's add a slider that will just be used to check whether we did any operation that blocked the UI or not.
  2. The final UI of the screen will look like this:
  1. Now, let's take ...

Get iOS Programming Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.