ios - Swift 3 - ">>>-" produces NSLayoutConstraint, not the expected contextual result type "Void" -
since swift 3 i'm getting error: ">>>-" produces nslayoutconstraint, not expected contextual result type "void" (aka "()") in project.
fileprivate func configuratecell(_ cell: basepagecollectioncell, backimage: uiimage?) { cell.translatesautoresizingmaskintoconstraints = false view.addsubview(cell) // add constraints [(nslayoutattribute.width, cell.bounds.size.width), (nslayoutattribute.height, cell.bounds.size.height)].foreach { info in cell >>>- { $0.attribute = info.0 $0.constant = info.1 } } [nslayoutattribute.centerx, .centery].foreach { attribute in (view, cell) >>>- { $0.attribute = attribute } } cell.layoutifneeded() }
Comments
Post a Comment