相关疑难解决方法(0)

使用estimatedItemSize删除项目时,UICollectionView单元格会调整大小

我有一个简单的项目,其故事板只包含一个单独的a UICollectionViewController,使用Xcode 7.1.1 for iOS 9.1构建

class ViewController: UICollectionViewController {

    var values = ["tortile", "jetty", "tisane", "glaucia", "formic", "agile", "eider", "rooter", "nowhence", "hydrus", "outdo", "godsend", "tinkler", "lipscomb", "hamlet", "unbreeched", "fischer", "beastings", "bravely", "bosky", "ridgefield", "sunfast", "karol", "loudmouth", "liam", "zunyite", "kneepad", "ashburn", "lowness", "wencher", "bedwards", "guaira", "afeared", "hermon", "dormered", "uhde", "rusher", "allyou", "potluck", "campshed", "reeda", "bayonne", "preclose", "luncheon", "untombed", "northern", "gjukung", "bratticed", "zeugma", "raker"]

    @IBOutlet weak var flowLayout: UICollectionViewFlowLayout!
    override func viewDidLoad() {
        super.viewDidLoad()        
        flowLayout.estimatedItemSize = CGSize(width: 10, height: 10) …
Run Code Online (Sandbox Code Playgroud)

ios autolayout uicollectionview swift

8
推荐指数
1
解决办法
773
查看次数

标签 统计

autolayout ×1

ios ×1

swift ×1

uicollectionview ×1