how to get ride of back button in navbar xcode

Swift
self.navigationItem.hidesBackButton=true;
Source

Also in Swift: