Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/39.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.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内部uiscrollview情节提要_Ios_Iphone_Objective C_Uitableview_Uiscrollview - Fatal编程技术网

Ios uitableview内部uiscrollview情节提要

Ios uitableview内部uiscrollview情节提要,ios,iphone,objective-c,uitableview,uiscrollview,Ios,Iphone,Objective C,Uitableview,Uiscrollview,因此,我在故事板中有一个UIScrollView,在故事板中也有一个UITableView。关键是我想在scrollview中放入该UITableView的几个实例。但我犯了个错误 无法将标识符为cell的单元格出列-必须为标识符注册nib或类,或在情节提要中连接原型单元格 那么如何解决这个问题呢 提前谢谢 好的!这是我的密码: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSInd

因此,我在故事板中有一个
UIScrollView
,在故事板中也有一个
UITableView
。关键是我想在scrollview中放入该
UITableView
的几个实例。但我犯了个错误

无法将标识符为cell的单元格出列-必须为标识符注册nib或类,或在情节提要中连接原型单元格

那么如何解决这个问题呢

提前谢谢

好的!这是我的密码:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"DayCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

    [self configerCell:cell atIndexPath:indexPath];

    return cell;
}
我在情节提要中给了一个单元格一个标识符

我就是这样将UITableView添加到UIScrollView的:

UITableViewController *tableView = [[UITableViewController alloc] initWithStyle:UITableViewStyleGrouped];
[self.mainScroll addSubview:tableView.view];

我认为您的tableview单元格需要一个标识符。尝试单击“表视图”单元格,在“属性检查器”下有一个名为“
标识符”
的字段。检查一下

您必须在-tableView:CellForRowatineXpath:中替换“Cell”,以命名您在故事板上提供的UITableViewCell原型。请发布相关代码-可能是您的CellForRowatineXpath:方法