这基本上就是我的目标:
但我的集合视图看起来像这样:
在不同的行之间有某种分隔符.我不需要它们用自动布局调整大小,它是4个单元格的重复模式,所以我知道每个单元格的确切大小.
我正在使用
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
Run Code Online (Sandbox Code Playgroud)
对于每个细胞的大小
这是我的流程布局:
let flowLayout = UICollectionViewFlowLayout()
flowLayout.scrollDirection = .Vertical
flowLayout.minimumLineSpacing = 10
flowLayout.minimumInteritemSpacing = 5
Run Code Online (Sandbox Code Playgroud)
如何处理这种分离?
我有这个测试脚本:
#!/bin/bash
echo "Read a variable"
#open file
exec 6<test.txt
read EXAMPLE <&6
#close file again
exec 6<&-
echo $EXAMPLE
Run Code Online (Sandbox Code Playgroud)
该文件test.txt只有一行:
EXAMPLE=1
Run Code Online (Sandbox Code Playgroud)
输出是:
bash-3.2$ ./Read_Variables.sh
Read the variable
EXAMPLE=1
Run Code Online (Sandbox Code Playgroud)
$EXAMPLE在这种情况下,我只需要使用值1.那么我怎样才能避免EXAMPLE=在输出中获得部分?
谢谢