Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/109.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/4/c/63.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 使用CollectionView的表视图_Ios_Layout_Uicollectionview - Fatal编程技术网

Ios 使用CollectionView的表视图

Ios 使用CollectionView的表视图,ios,layout,uicollectionview,Ios,Layout,Uicollectionview,我必须在表中表示数据。 我正试图建立一个适合这样做的布局 我的想法是: 我已经开始实施了。 我以编程方式构建了一个Collecionview,其结果如下: !![我的作品][2] 互联网上有无限的解决方案。对我来说,这似乎是最合适的,但现在我有两个主要问题: 我已经水平地实现了CollectionView。所以如果我把 超过15个ithem结构由于添加了 我把它们放在一个新的专栏里。因此,我希望它添加到下面,并创建一个垂直 滚动视图 第二个问题是阻止第一行的第一列,然后 水平滚动视图 使用旋转

我必须在表中表示数据。 我正试图建立一个适合这样做的布局

我的想法是:

我已经开始实施了。 我以编程方式构建了一个Collecionview,其结果如下:

!![我的作品][2]

互联网上有无限的解决方案。对我来说,这似乎是最合适的,但现在我有两个主要问题:

  • 我已经水平地实现了CollectionView。所以如果我把 超过15个ithem结构由于添加了 我把它们放在一个新的专栏里。因此,我希望它添加到下面,并创建一个垂直 滚动视图
  • 第二个问题是阻止第一行的第一列,然后 水平滚动视图
使用旋转表格视图

-(void) didLoad{
 ....
[self.tableView.layer setAnchorPoint:CGPointMake(0.0, 0.0)];
self.tableView.transform = CGAffineTransformMakeRotation(M_PI/-2);
self.tableView.showsVerticalScrollIndicator = NO;
....
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath
{

SEScrollMenuCell * cell = [tableView dequeueReusableCellWithIdentifier:@"menuCell" forIndexPath:indexPath];
//use custom UI objects inside cell
cell.label_text.text = [self.items objectAtIndex:indexPath.row];
cell.label_text.textAlignment = NSTextAlignmentCenter;
cell.selectionStyle = UITableViewCellSelectionStyleGray;
cell.label_text.textAlignment = NSTextAlignmentCenter;

cell.label_text.transform = CGAffineTransformMakeRotation(M_PI/2);
cell.label_text.frame = CGRectMake(0.0, 0.0, 32.0, [[self.items_width objectAtIndex:indexPath.row] doubleValue]);
.......
return cell;
}