目前我在iPhone應用程序工作,使用兩個按鈕,然後我設置圖像都button1和button2,然後我試圖將圖像從button1拖到button2,是否有可能這樣做?請幫我如何將圖像從一個按鈕拖動到iPhone中的另一個按鈕?
由於提前
button1 = [UIButton buttonWithType:UIButtonTypeCustom];
[button1 setImage:[UIImage imageNamed:@"hearta.png"] forState:UIControlStateNormal];
button1.frame=CGRectMake(10, 60, 50, 50);
[button1 addTarget:self action:@selector(Button1Method) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button1];
button2 = [UIButton buttonWithType:UIButtonTypeCustom];
[button2 setImage:[UIImage imageNamed:@"club4.png"] forState:UIControlStateNormal];
button2.frame=CGRectMake(61, 60, 50, 50);
[button2 addTarget:self action:@selector(Button2Method) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button2]
感謝您的回覆 – SampathKumar