développement iphone ..need au texte fondu sur une image d'arrière-plan
Question
Je souhaite avoir un lable avec le texte qui apparaît et se fane lentement sur une image d'arrière-plan. et une lable sur l'image avec du texte mais je souhaite qu'il reste pour i secondes, puis en utilisant gradualy fondu im Xcode et utalising constructeur d'interface. merci
La solution
Eh bien, si vous avez un UIImage et UILabel liés de l'Interface Builder, placez ce qui suit dans la méthode viewdidload:
:
// Starting state
myLabel.alpha=0.0;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
// Ending state
myLabel.alpha=1.0;
[UIView commitAnimations];
// Run another function to fade out after a second
[self performSelector:@selector(fadeOut:) withObject:sender afterDelay:1.0];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow