Note that there are some explanatory texts on larger screens.

plurals
  1. POI want to animate a UIButton in two ways
    primarykey
    data
    text
    <p>I'v added an UIView in my controller then added a UIButton on that View. Am animating that view horizontally, so along with that view my button also moving, since its add on that view, but I want that when user touches the button(which is animating) button should animate up &amp; came down immediately. This button's animation should be performed, while the older animation of view (button's super view) is animating.</p> <p>I have done that but, button is animating up n down until the big animation of that view not get start, once the animation of button's super view get started, it is not performing that animation which it was performing before( on touch).</p> <p>Here is the code</p> <pre><code>tempRabbit = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 360, 360)]; tempView=[[UIView alloc]initWithFrame:CGRectMake(900, 0, 1024, 500)]; UIImageView *temp=[[UIImageView alloc]initWithFrame:CGRectMake(0, 200, 360, 360)]; UIButton *tempBtn=[UIButton buttonWithType:UIButtonTypeRoundedRect]; [tempBtn setFrame:CGRectMake(0, 0, 360, 360)]; [tempBtn addTarget:self action:@selector(rabbitTaped1) forControlEvents:UIControlEventTouchUpInside]; [tempBtn setTitle:@"Show View" forState:UIControlStateNormal]; NSArray *animationArray=[[NSArray alloc]init]; animationArray=[NSArray arrayWithObjects: [UIImage imageNamed:@"rabbit1.png"], [UIImage imageNamed:@"rabbit2.png"], [UIImage imageNamed:@"rabbit3.png"], [UIImage imageNamed:@"rabbit4.png"], [UIImage imageNamed:@"rabbit5.png"], [UIImage imageNamed:@"rabbit6.png"], [UIImage imageNamed:@"rabbit7.png"], [UIImage imageNamed:@"rabbit8.png"], [UIImage imageNamed:@"rabbit9.png"], [UIImage imageNamed:@"rabbit10.png"], [UIImage imageNamed:@"rabbit11.png"], [UIImage imageNamed:@"rabbit12.png"], [UIImage imageNamed:@"rabbit13.png"], nil]; temp.animationImages=animationArray; temp.animationDuration=2; temp.animationRepeatCount=0; [temp startAnimating]; //[tempRabbit addSubview:temp]; [tempRabbit addSubview:tempBtn]; [tempView addSubview:tempRabbit]; [self.view addSubview:tempView]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload