Search code examples
iosswiftviewcontroller

Why does my new swift file have missing codes?


When I generate a new swift file, there is only: import Foundation on display. There are no class or function codes that would usually be auto-generated when I create a new file. I tried to fill them in manually and run the codes but I keep getting error of: Thread 1:signal SIGABRT. How do I fix this?


Solution

  • enter image description here insted of creating swiftfile please try to create swift viewcontrollerfile. pleasee check the image.

    to create swift viewcontroller file file->new->file->Coco Touch Class->ViewControllerfile