I\'d like to request the user\'s Twitter mail. On https://dev.twitter.com/twitter-kit/ios/request-email we can see the code in Obj-C but I need it in Swift and I can\'t tran
This should roughly translate the above Objective-C to Swift:
if (Twitter.sharedInstance().session() != nil) {
if let shareEmailViewController = TWTRShareEmailViewController(completion: {
(email: String!, error: NSError!) in
if (email != nil) {
print("\(email)")
} else {
print("\(error)")
}
}) {
self.presentViewController(shareEmailViewController, animated: true, completion: nil)
}
} else {
print("User not logged in")
}