button.center is a shortcut for button.frame.center, and is the coordinate of the center of the button inside the superview's coordinate system.
button.height is a shortcut for button.frame.size.height
Here are the basic rules (so you predict what happens). a view's positionis defined by its top left point, and a width and height. If you change width or height, the top left corner stays put.
(there is not really a way to say, i want to position using the center, or bottom left, etc, so the convention is, top left)
Now, if you want to expand about the center, one approach is to simply store the center location and set it back again
oldcenter=btn.center
btn.width=150
btn.center=oldcenter
Another thing that confuses most people is the difference between frame and bounds. It toom me a long time to understand... frame refers to your position in your parent's coordinate system (i.e relative to your superview's top left corner). bounds refers to your position in your OWN coordinate system. So, if you want to center a button inside another view, you use
view.add_subview(btn)
btn.center = view.bounds.center
(btn.center refers to btn.frame.center, so is in the super view coordsys, and in this case we want it to match the superview center).
Now, if you want to KEEP the centers aligned when the screen rotates, you would use flex, which is how you tell the system whether you intended to place your button really at a particular pixel value, or are more interested in the relative relationship.
adjusting bounds also becomes important when you start dealing with ui.Transforms.