Используется PanGestureReconizer
и ручка
-(void)handleResizePanGesture:(UIPanGestureRecognizer*)p {
if (p.state ==UIGestureRecognizerStateBegan) {
touchStart = [p translationInView:self];
touchStart = CGPointMake(touchStart.x - self.bounds.size.width,
touchStart.y - self.bounds.size.height);
}
if (p.state == UIGestureRecognizerStateChanged) {
touchPoint = [p translationInView:self];
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y,
touchPoint.x - touchStart.x, touchPoint.y - touchStart.y);
UITextView *textV = (UITextView*)[self viewWithTag:100];
textV.frame = CGRectMake(self.bounds.origin.x+HotCornerHeight/2, self.bounds.origin.y+HotCornerHeight/2,
touchPoint.x - touchStart.x-HotCornerHeight, touchPoint.y - touchStart.y-HotCornerHeight);
UIButton *resButton = (UIButton*)[self viewWithTag:102];
resButton.frame = CGRectMake(self.bounds.size.width-resizeButton,self.bounds.size.height-resizeButton, resizeButton,resizeButton);
}
if (p.state ==UIGestureRecognizerStateEnded || p.state ==UIGestureRecognizerStateEnded) {
return;
}
}
'
Надежда это позволит сэкономить время в будущем для других.