I'm just learning the latest ObjC and Xcode, I want to ask a simple newbie question: There are two buttons on the graphical user interface (for example, called Left and Right), now click on any one of them, we must realize the position of the two buttons exchanged (not a simple swap tags). I ask how to do? What method to use? The need to use delegate? Hope that the experience of you can point me to twelve.
Reply:
You just need to specify both the frame button on it,
For example, the following statement two button:
UIButton * b1;
UIButton * b2;
Then the code follows the exchange:
CGRect ftemp;
ftemp = b1.frame;
b1.frame = b2.frame;
b2.frame = ftemp;
Reply:
Reply:
Has been resolved, thank you very much! Forget their problems are two buttons in the IB in connection
No comments:
Post a Comment