Tim
Tim

Reputation: 25

Button Width, height

What is the best way to go about changing the dimensions of a UIButton at runtime? Width? Height?

Upvotes: 2

Views: 775

Answers (1)

Jacob Relkin
Jacob Relkin

Reputation: 163318

Set the frame.

CGPoint origin = button.frame.origin;
button.frame = CGRectMake( origin.x, origin.y, newWidth, newHeight );

Upvotes: 4

Related Questions