jiahuat
jiahuat

Reputation: 23

Xcode doesn't automatically create viewDidLoad method

When I create a subclass of UIViewController, Xcode doesn't automatically create viewDidLoad method and didReceiveMemoryWarning method. Why did this happen? What should I do to make it work normal?

Upvotes: 0

Views: 90

Answers (1)

Nicolas Miari
Nicolas Miari

Reputation: 16256

Make sure you are choosing "Cocoa Touch Class" (from the iOS section of templates) and not "Cocoa Class" (from the macOS / OSX section of templates) when creating the new file.

Upvotes: 1

Related Questions