How can I programatically constrain UIButtons in a UIView to proportional widths using NSLayoutConstraints
问题 I am trying to create a custom keyboard programatically. I have managed to get the functionality of the keyboard working but am struggling with setting the constraints programatically. I have managed to find code to constrain the buttons to be equal sizes in their rows but cannot customise it enough to set the width (or proportional width) of certain buttons. Here is a picture of the keyboard currently Each row is a separate UIView filled with UIButtons corresponding to each key. I then