Convert controller to Swift.