title: How to drag and drop UIButton title to another button title but the original button remain in same place objective c?
body: <p>I have created Uibutton programmatically as grid in scrollview.Now I need to drag and drop the UIbutton title to another button.But the original button title should remain same.I searched stackoverflow I found option to drag original button or label to new position.Please anybody help me to fix this .
  Thanks</p>
  
  <pre><code>int x=0;
  int y = 20;
  for (int i=0; i&lt;20; i++) //20 = total button
  {
      UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
      [btn setTitle:@"TEXT" forState:UIControlStateNormal];
      [btn addTarget:self action:@selector(dragOut:withEvent:)forControlEvents:UIControlEventTouchDragOutside |UIControlEventTouchDragInside];
  
      btn.frame = CGRectMake(10+x,y, 100, 100);
      x=x+70;
      [self.scrollView addSubview:btn];
      if((i+1)%4==0)//4 means how many buttons you need for a row
      {
          y+=110;
          x=0;
      }
  }
  
  
  [self.scrollView setContentSize:CGSizeMake(300, y)];
  </code></pre>