I have a little view that I would like to attach to a bigger view. When either of the views is dragged on the x axis I would like the other to move accordingly - as if they were one awkward shaped view
I tried
UIDynamicAnimator *animator = [UIDynamicAnimator alloc] initWithReferenceView:self.view];
UIAttachmentBehavior *attach = [[UIAttachmentBehavior alloc] initWithItem:firstItem attachedToSecondItem:secondItem];
[animator addBehavior:attach];
but they aren't moving like one big view :(