Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.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
Xcode5 如何计算UIIOS中的表单元格_Xcode5_Ios Ui Automation_Xcode Instruments - Fatal编程技术网

Xcode5 如何计算UIIOS中的表单元格

Xcode5 如何计算UIIOS中的表单元格,xcode5,ios-ui-automation,xcode-instruments,Xcode5,Ios Ui Automation,Xcode Instruments,如果单元在UITableView中随机创建,如何通过IOS中的仪器计算单元总数 为什么不使用属性?从注释中提供的代码来看,它应该如下所示: var cellsCount = application .mainWindow() .collectionView()[0] .cells()[0] .tableViews()[0]

如果单元在UITableView中随机创建,如何通过IOS中的仪器计算单元总数

为什么不使用属性?从注释中提供的代码来看,它应该如下所示:

var cellsCount = application
                    .mainWindow()
                    .collectionView()[0]
                    .cells()[0]
                    .tableViews()[0]
                    .cells()
                    .length;

UIALogger.logMessage(cellsCount);

我曾试图计算,但计算不正确。我正在编写部分代码:\n var temp=application.mainWindow().collectionView()[0]。cells()[0]。tableview()[0]。cells()[0]\n var x=0\n(临时变量i){x=x+1}\n UILogger.logMessage(x);