Ios recently created quick import of cocoa files by default in xcode

I am developing an iOS application and want to create new features now. But when I create a new file by Xcode-> File-> New-> File β†’ Cocoa Class-> Language Swift, the newly created file is always import Cocoa instead of UIKit .

Is this the default behavior for all of you? And is there a way to change the UIKit import every time I create a new quick file?

UPDATE: thanks for all the answers. I made a terrible mistake.

+6
source share
1 answer

Make sure you select the file from the iOS section, not OS X , and then it will use UIKit instead of Cocoa

screenshot

+18
source

Source: https://habr.com/ru/post/985048/


All Articles