2
목표 C가 처음인데 런타임시 UIButton & UIImageView를 사용하여 화면상의 한 세트의 위치에서 다른 설정 위치로 UIImageView의 애니메이션을 토글하려고합니다. 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];