I am new to ios development and started coding with swift,and I have some basic question regarding NSOject and i couldn't find any satisfactory answer.
My question is, If we are creating a new class ,is it mandatory that the class must inherit from the root class of the foundation (i.e), NSObject or it is optional as now we have swift file template in xcode.
import UIKit
class Myclass: NSObject {
}
or
import UIKit
class Myclass { // where here myclass is the base class
}
Any help would be appreciated...