Reputation: 1537
I want to have three containers on one UIViewController. The user should be able to change the size of the containers like the textfield here in stackoverflow. So the user can change the size with his finger. The user grap a point in the container an pull it at the size he wants. I couldn't find any example. I don't even find a starting point. I hope someone has an idea.
Upvotes: 1
Views: 79
Reputation: 31
I have done something similar. I put some buttons on each side of the view and handle the action with the events UIControlEvents.TouchDragInside and .TouchDragOutside. You can then use the UIEvent to get the position of the touch in the view and change the size of the view or the contraints (depending if you use autolayout or not).
Upvotes: 0
Reputation: 6414
I'd use a UIPanGestureRecognizer
and calculate the dragging distance to increase the views frame by that.
Upvotes: 1