How to get the device name in Swift Programming

To get the name of the device call:


Swift Programming – Error- unrecognized selector sent to instance

I was getting this error when using :

NSNotificationCenter.defaultCenter().addObserver(self, selector: “method”, name: UIDeviceOrientationDidChangeNotification, object: nil)