UITableView reload data

后端 未结 7 1326
鱼传尺愫
鱼传尺愫 2020-12-01 00:27

i\'m making a navigation based application for iphone.

one of my view controllers looks like this:

@interface NewComputerViewController : UIViewContr         


        
相关标签:
7条回答
  • 2020-12-01 01:06

    Make sure you are setting datasource and delegate for tableView.

    tableView.delegate = self;
    tableView.dataSource = self;
    

    Make sure the proper delegate and datasource method is implemented in the controller.

    In the loadStuff method, call:

    [tableView reloadData];
    

    In swift, the same:

    tableView.delegate = self
    tableView.dataSource = self
    tableView.reloadData()
    
    0 讨论(0)
提交回复
热议问题