我无法理解我在面试中遇到的这段代码声明。
int(*(*ptr[3])(char*))[2];
Run Code Online (Sandbox Code Playgroud)
我试着看一个IDE,但是我所拥有的只是它是数据类型的数组
int (*(*[3])(char *))
Run Code Online (Sandbox Code Playgroud)
我不明白这一点。
这是我的刷新控件代码。(代码已更新为整个 ViewController 代码以便更好地理解)
import UIKit
class AirportTableViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, AirportRequestDelegate {
@IBOutlet weak var airportTable: UITableView!
var airportRequest = AirportRequest()
var airportList = [AirportDetail]()
var refreshControl = UIRefreshControl()
override func viewDidLoad() {
super.viewDidLoad()
self.title = "Airport List"
airportTable.delegate = self
airportRequest.delegate = self
airportRequest.fetchAirports()
airportTable.dataSource = self
refreshControl.addTarget(self, action: #selector(refresh), for: UIControl.Event.valueChanged)
airportTable.addSubview(refreshControl)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return airportList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let myCell …Run Code Online (Sandbox Code Playgroud)