The way I know I can view the automatically-translated Swift versions of Cocoa APIs is by command-clicking a Cocoa type in Xcode. For example, here's what is generated for UITableViewController:
class UITableViewController : UIViewController, UITableViewDelegate, NSObjectProtocol, UIScrollViewDelegate, UITableViewDataSource {
init(style: UITableViewStyle)
var tableView: UITableView!
var clearsSelectionOnViewWillAppear: Bool // defaults to YES. If YES, any selection is cleared in viewWillAppear:
var refreshControl: UIRefreshControl!
}
Is there an alternate way to make Xcode generate this Swift version? Preferably from the command line?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…