2
我是新來的目標C,並試圖將UIImageView的動畫從屏幕上的一組位置切換到使用UIButton在運行時創建的UIButton的屏幕上的另一組位置。當我按下UIButton時,我想讓UIImageView從一個位置到另一個位置進行動畫製作,而UIButton的setBackgroundImage切換到另一個imageNamed:狀態。使用在運行時創建的UIButton切換UIImageView的動畫
任何幫助將不勝感激!
// UIImageView - Roof Panel Creation
roofPanel = [[UIImageView alloc]initWithFrame:CGRectMake(300, 400, 400, 400)];
[roofPanel setImage:[UIImage imageNamed:@"roof-panel.png"]];
[self.view addSubview:roofPanel];
// UIButton - Panel Lift Button Creation
panelLiftButton = [[UIButton alloc]initWithFrame:CGRectMake(722, 300, 70, 50)];
[panelLiftButton setImage:[UIImage imageNamed:@"panel-lift-button.png"] forState:UIControlStateNormal];
[self.view addSubview:panelLiftButton];