How to give programmatically constraints equal width and equal height with multiple views.I check google but not perfect answer for programmatically equal width and height const
Try this:
let widthConstraint = NSLayoutConstraint(item: customView, attribute: .width, relatedBy: .equal, toItem: viewForRow1, attribute: .width, multiplier: 0.25, constant: 0.0)
multiplier: 0.25, denotes that customView's width will be 1/4th of the parent view, viewForRow1.
multiplier: 0.25
customView
viewForRow1