What is the best way to go about resizing an object when it is touched?
Basically, I want to have a box (ideally one that can have rounded corners). When the left half of the box is clicked, the box will slowly and smoothly increase in size on the y axis, pushing down the objects of similar type below it. When the right half of the box is clicked, the box will slowly and smoothly shrink in size.
I'm wondering what types of objects I should use for this. I'm thinking buttons, as they can have rounded corners (How to round the corners of a button). I will have one big button that will have a colored background and two smaller buttons inside that will each take up half the parent button.
I'll give all the buttons integer identifiers in ascending order from top to bottom. When button 3 is made larger, I will move all buttons 4 and up down correspondingly.
Basically, the buttons can only be fixed sizes (let's say only multiples of 10 for simplicity) but I want to animate them moving smoothly between these sizes. Additionally, when the user first taps the button, I want the animation to start and continue linearly until the user removes their finger, at which point I want it to animate to the next multiple of 10.. How should I go about this part?
I also need to make the view that contains the buttons scrollable, as I want people to be able to make boxes taller than the height of the screen. How can I go about this?
If you have any other suggestions they are welcome too.