xcode - UIImageview Fade -


i trying image fade out , fade in when click on button. there wrong code? image stays visible when click on button.

- (ibaction)alpha:(id)sender {     [uiview beginanimations:nil context:null];     [uiview setanimationcurve:uiviewanimationcurveeasein];     [uiview setanimationduration:2];     _image.alpha = 1;     [uiview commitanimations];     [uiview setanimationdidstopselector:@selector(animationdidstop:finished:context:)];   } -(void)animationdidstop:(nsstring *)animationid finished:(nsnumber *)finished context:(void *)context {     [uiview beginanimations:nil context:null];     [uiview setanimationduration:2];     _image.alpha = 0;     [uiview commitanimations]; } 

you calling methods on uiview, class, not on instance of uiimageview want fade.

you'll want like

[self.myimageview beginanimations.... 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -