开发者

How can I make a UIView that is stretchable by its corners?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜