1

Does swift execute all functions (including custom) in the '.swift' file simultaneously? Or is there a main method in which you have to call the other ones? Because I want to call a certain method in my game, whenever the player hits the edge of the screen.

Diljot Jawanda
  • 69
  • 1
  • 2
  • 5
  • Are you making an iOS/Mac app project, or is this just a single Swift file / Playground? – Kenneth Aug 15 '16 at 12:53
  • You can use the `didFinishLaunchingWithOptions` method in the `AppDelegate.swift`. However, you generally write code in `ViewController.swift`. There, you can use `viewDidLoad`, `viewWillAppear`, `viewDidAppear`, etc. – Pranav Wadhwa Aug 15 '16 at 20:13

0 Answers0