Skip to content

Instantly share code, notes, and snippets.

@dimohamdy
Last active April 27, 2019 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimohamdy/33e5f30a8742fcbb7a20d9dd92effa73 to your computer and use it in GitHub Desktop.
Save dimohamdy/33e5f30a8742fcbb7a20d9dd92effa73 to your computer and use it in GitHub Desktop.
weak var sourceVC: UIViewController!
//make it weak to avoid retain cycle
func registerFor3DTouch(viewController: UIViewController?) {
if let viewController = viewController {
sourceVC = viewController
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment