一视图控制器中的两个表视图,swift

一视图控制器中的两个表视图,swift,swift,uitableview,uiviewcontroller,tableview,Swift,Uitableview,Uiviewcontroller,Tableview,我的视图控制器有两个表视图。askTable可以工作,但是bidTable不能工作。没有错误出现 这是它打印的内容。数组正好包含我想要的元素。我不知道我做错了什么或错过了什么。此外,我还想知道为什么“Hi”从来没有打印出来 askPriceArray: [] bidPriceArray: [] bid: 0 Above repeat several times askPriceArray: [] bidPriceArray: ["21"] ask: 0 askPriceArray: [] bi

我的视图控制器有两个表视图。askTable可以工作,但是bidTable不能工作。没有错误出现

这是它打印的内容。数组正好包含我想要的元素。我不知道我做错了什么或错过了什么。此外,我还想知道为什么“Hi”从来没有打印出来

askPriceArray: []
bidPriceArray: []
bid: 0 
Above repeat several times
askPriceArray: []
bidPriceArray: ["21"]
ask: 0
askPriceArray: []
bidPriceArray: ["21", "212"]
ask: 0
askPriceArray: ["21"]
bidPriceArray: ["21", "212"]
ask: 1


}

从Parse中检索数据后,确保正在重新加载这两个
UITableView

从Parse中检索数据后,确保正在重新加载这两个
UITableView

我看不出你的代码有什么问题。设置数据时是否重新加载两个表视图?我忘了重新加载bidTable。谢谢。我看不出你的代码有什么问题。设置数据时是否重新加载两个表视图?我忘了重新加载bidTable。谢谢,谢谢你的帮助。我忘了重新加载投标表。再次感谢你的帮助。我忘了重新加载投标表。再次感谢
import UIKit 
class ProductDetailViewController: UIViewController, UITableViewDataSource, UITableViewDelegate
{
    @IBOutlet weak var bidTable: UITableView!
    @IBOutlet weak var askTable: UITableView! 
    var askPriceArray = [String]()
    var bidPriceArray = [String]()
override func viewDidLoad() {
    super.viewDidLoad()
    self.bidTable.dataSource = self
    self.bidTable.delegate = self
    self.askTable.dataSource = self
    self.askTable.delegate = self
}
override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}
override func viewDidAppear(animated: Bool) {
.....insert elements to arrays from Parse..........
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    print("askPriceArray: \(self.askPriceArray)")
    print("bidPriceArray: \(self.bidPriceArray)")

    if tableView == self.askTable {
        print("ask: \(askPriceArray.count)")
        return askPriceArray.count
    } else {
        print("bid: \(bidPriceArray.count)")
        return bidPriceArray.count
    }
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
    if tableView == self.askTable{
        let cell:DetailAskTableViewCell = tableView.dequeueReusableCellWithIdentifier("askCell") as! DetailAskTableViewCell
        cell.askPriceAndQuantity.text = self.askPriceArray[indexPath.row]
        return cell
    } else {
        print("Hi")
        let cell:DetailBidTableViewCell = tableView.dequeueReusableCellWithIdentifier("bidCell") as! DetailBidTableViewCell
        cell.bidPriceAndQuantity.text = self.bidPriceArray[indexPath.row]
        return cell
    }
}