问题
I have one UIButton(lets say instance1).I have set target method when it moves.So when I try to move(drag) I want to do that create copy of instance1 and that copy button should be moved(dragged).Yes I know that -copy will not support to UIButton.So I used :
NSData *archivedData = [NSKeyedArchiver archivedDataWithRootObject: sender];
UIButton *buttonCopy = [NSKeyedUnarchiver unarchiveObjectWithData: archivedData];
But the problem is when I am trying to move copy button,its not moving and on second attempt it is hiding/removing from screen.Please help me.
来源:https://stackoverflow.com/questions/19241208/duplicate-the-uibutton-and-move-it