is there a cleaner way to edit 1 of the 4 CGRect values of a UIView's frame?

Viewed 340

generally when I want to move a label to the right 20px, or increase just the width of a view, I go through one of the following avenues

label.frame = CGRectMake(label.frame.origin.x+20, label.frame.origin.y, label.frame.size.width, label.frame.size.height);

or

CGRect viewFrame = view.frame;
viewFrame.x += 20;
view.frame = viewFrame;

I don't particularly like the amount of code that goes into either variation and was hoping you guys knew a shortcut that I hadn't discovered

3 Answers
Related