Although there a few answers already on this topic. None of them cover Swift 3 and they are from a long …