如何使用两侧的处理程序创建可调整大小的视图以在ios中拉伸或调整大小? [英] How to create resizable view with handlers on sides to stretch or resize in ios?
问题描述
我正在创建一个应用程序,用户触摸屏幕并在屏幕上放置一个矩形视图,他可以通过触摸其角落来移动或调整大小,就像任何其他裁剪视图一样。我已经完成了这个功能,但我希望在该矩形的两侧有八个处理程序,以便用户可以使用该处理程序来调整它的大小。现在我无法创建这样的功能。我尝试在该矩形视图上添加八个按钮作为子视图,但是当调整大小时,当该视图增加其大小而不是所有八个按钮时,只需改变它们的位置。任何人都可以帮我这个功能吗?
I am creating an app where user touch the screen and places a rectangle view on screen which he can move or resize by touching its corners like any other crop view . I have done this functionality but i want eight handlers on the sides of that rectangle so that user can use that handlers to resize it. Now i am unable to create such functionality . I tried to add eight buttons as subview on that rectangle view but when resizing when that view increase its size than all eight buttons just change their positions . can anybody help me with this functionality ?
提前致谢
推荐答案
我从这里得到答案。这是一个制作可调整大小视图的好课程。开发人员的出色工作
Hi i got the answer from here . here is a great class for making resizable view. Great work by the developer
这篇关于如何使用两侧的处理程序创建可调整大小的视图以在ios中拉伸或调整大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!