I'd like to have a UIView where the user can select each of t开发者_开发技巧he four corners and stretch the view by independently moving them.
How would I implement such a view?
To do this, you will need to subclass UIView and handle touch events manually. When you get a touch event, you will have to do some math and then set the frame of the view to the new size. I'd recommend making the background image a stretchable image using stretchableImageWithLeftCap:topCap. It shouldn't actually be that hard.
精彩评论