In the view controller class I'm trying to make buttons programmatically in a 10x10 grid. I have constraints and the view is resizing properly, but the size I'm getting back and seeing from the print statement is the original size from the story board and not the resized size. How do I get the new size?
func buttonGridder() {
for x in 0..<10 {
for y in 0..<10{
let sizer = ButtonGrid.frame.width
let buttonSize:CGFloat = ButtonGrid.frame.width / CGFloat(10)
print("\(x), \(y), \(buttonSize), \(sizer)")
let letterButton = WordButton(column: x, row: y, buttonSize: buttonSize, buttonMargin: 0)
self.ButtonGrid.addSubview(letterButton)
}
}
}