Skip to content

Instantly share code, notes, and snippets.

@almaleh
Created March 2, 2020 18:15
Show Gist options
  • Select an option

  • Save almaleh/7f0acc45a29b5913809dc31047111934 to your computer and use it in GitHub Desktop.

Select an option

Save almaleh/7f0acc45a29b5913809dc31047111934 to your computer and use it in GitHub Desktop.

Revisions

  1. almaleh created this gist Mar 2, 2020.
    6 changes: 6 additions & 0 deletions nested-closure2.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    let workItem = DispatchWorkItem { [weak self] in
    UIView.animate(withDuration: 1.0) {
    self?.view.backgroundColor = .red
    }
    }
    self.workItem = workItem