Adding json data into UITableView

前端 未结 2 1285
-上瘾入骨i
-上瘾入骨i 2020-12-22 11:15

This is a sample getData method in my viewController.m file

-(void) getData {
// Create new SBJSON parser object
SBJsonParser *parser = [[SBJsonParser allo         


        
2条回答
  •  时光说笑
    2020-12-22 11:45

    Implement the UITableViewDataSource protocol:

    • tableView:numberOfRowsInSection: - return the number of "statuses"
    • tableView:cellForRowAtIndexPath: - return a UITableViewCell whose textLabel.text is set to your text.

    There are plenty of examples in Apple's docs, including the project you get when you create a new app using Xcode's "Master-Detail App" template.

提交回复
热议问题