Often I need to simply move the view 5 pixels down.
My approach is like this
view.frame = CGRectMake(view.frame.origin.x, view.frame.origin.y + 5, view.frame.size.width, view.frame.size.height);
Isn’t there some easier way? :-/
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Perhaps I should write a bunch of categories for the UIView class.
Something like
The main reason I do not like the solution in my original post is that it is very code sense unfriendly and too verbose.
I would allow for negative and positive values and nil for no change.
What do you guys think?