Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 未调用UITableView更新程序函数((UITableView)tableview cellForRowAtIndexPath)_Ios_Objective C_Uitableview - Fatal编程技术网

Ios 未调用UITableView更新程序函数((UITableView)tableview cellForRowAtIndexPath)

Ios 未调用UITableView更新程序函数((UITableView)tableview cellForRowAtIndexPath),ios,objective-c,uitableview,Ios,Objective C,Uitableview,编辑:通过“函数”,我指的是(UITableView)tableView单元格的行索引路径,它在我的标题中有说明,但我想说清楚 所以,是的,还有其他的答案,我有几个。由于某种原因,我的函数没有被调用。我一直在关注这个。返回了5次不同的时间,以确保我正确地完成了所有数据源和委托,我想我是的。我以前做过iOS应用程序,从来没有遇到过这个问题。我不认为代码有任何问题,我调试了它,它应该可以正常工作。我会把它贴在任何地方,以防我在那里的某个地方犯了一个业余错误。别以为我错了,但我以前错过 ViewCon

编辑:通过“函数”,我指的是(UITableView)tableView单元格的行索引路径,它在我的标题中有说明,但我想说清楚

所以,是的,还有其他的答案,我有几个。由于某种原因,我的函数没有被调用。我一直在关注这个。返回了5次不同的时间,以确保我正确地完成了所有数据源和委托,我想我是的。我以前做过iOS应用程序,从来没有遇到过这个问题。我不认为代码有任何问题,我调试了它,它应该可以正常工作。我会把它贴在任何地方,以防我在那里的某个地方犯了一个业余错误。别以为我错了,但我以前错过

ViewController.h

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
@property (weak, nonatomic) IBOutlet UITableView *tableView;


@end
这是我的引用出口(这就是为什么我认为它真的很奇怪,它没有调用函数)。对不起,我想我需要10个代表直接在SO上发布图片


非常感谢您提供的帮助。

为什么不在
[self.tableView reloadData]上设置一个断点。如果断点从未命中,则数组为空。您还应该检查错误值是否有任何有用的内容。

我会在

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    NSLog(@"array count is %d", [_array count]); 
    return [_array count];
}

我认为它是空的,因此不会调用其他方法。

是的,它没有命中它。我需要回去确保我做的一切都是正确的。谢谢你的提示。是的,因为某种原因我发现我的数组是0。谢谢你的提示。
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    NSLog(@"array count is %d", [_array count]); 
    return [_array count];
}