Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/101.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
Iphone 如何在ipad应用程序中显示网格视图等数据_Iphone_Ios_Xcode_Datagrid - Fatal编程技术网

Iphone 如何在ipad应用程序中显示网格视图等数据

Iphone 如何在ipad应用程序中显示网格视图等数据,iphone,ios,xcode,datagrid,Iphone,Ios,Xcode,Datagrid,在ipad应用程序中,有没有办法在网格视图表单中显示数据 我想在ipad应用程序中的网格视图中显示数据我搜索了很多,有人说使用自定义表视图,但它不是我想要的全专业版,我找到了iOS DataGrid TableView for ipad 无论是免费的还是非免费的,都可以使用。如果可能或不可能,如何实施。 下面是iOS网格的链接 通过使用CustomUITableViewCell,您可以获得相同的结果。即,获取UITableviewcell并向其添加三个或四个标签。然后将数据传递到cellForR

在ipad应用程序中,有没有办法在网格视图表单中显示数据

我想在ipad应用程序中的网格视图中显示数据我搜索了很多,有人说使用自定义表视图,但它不是我想要的全专业版,我找到了iOS DataGrid TableView for ipad

无论是免费的还是非免费的,都可以使用。如果可能或不可能,如何实施。 下面是iOS网格的链接


通过使用CustomUITableViewCell,您可以获得相同的结果。即,获取UITableviewcell并向其添加三个或四个标签。然后将数据传递到cellForRowAtIndexPath方法中。

根据需要创建自定义UITableviewcell,并将该单元格加载到表视图单元格中

您可以使用下面的示例代码,使用表中的CellForRowatineXpath方法加载自定义单元格:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *sCellIdentifier = @"CustomCell"; CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:sCellIdentifier]; if (cell == nil) { NSArray *topLevelObject = [[NSBundle mainBundle] loadNibNamed: @"CustomCell" owner:self options:nil]; for (id currentObject in topLevelObject) { if ([currentObject isKindOfClass:[UITableViewCell class]]) { cell = (CustomCell *)currentObject; break; } } } cell.label1.text = @"label1"; // you can access all controllers of your custom cell like this way cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } -(UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath{ 静态NSString*sCellIdentifier=@“CustomCell”; CustomCell*单元格=(CustomCell*)[tableView dequeueReusableCellWithIdentifier:sCellIdentifier]; 如果(单元格==nil){ NSArray*topLevelObject=[[NSBundle mainBundle]loadNibNamed:@“CustomCell”所有者:自选项:nil]; 用于(topLevelObject中的id currentObject){ if([currentObject IsKindof类:[UITableViewCell类]]){ 单元格=(CustomCell*)currentObject; 打破 } } } cell.label1.text=@“label1”;//您可以这样访问自定义单元格的所有控制器 cell.selectionStyle=UITableViewCellSelectionStyleNone; 返回单元; }
你怎么可能没有偶然发现

但是,如果您只对单元的样式感兴趣,则可以实现一个网格较少的单元,并根据您的需求对其进行样式设置


有许多教程介绍了如何自定义
UITableViewCell

我使用了GMGridview,它有一个例子,基本上,如果你改变单元格大小和列,你可以让它适合iPad或iPhone。如果需要输入数据,还可以添加UITextField(而不是默认的UILabel)。一个很好的特性是它可以滚动


如果您有任何问题,请随时提问。

我们在应用程序中使用此选项:。到目前为止,我们都很喜欢。

今天看到了这张照片。我没有深入研究它,但它看起来很酷。谢谢你提到我们的产品!!我们已经开源了!