objective c fade animation UIImageView
Posted by Eng.Ahmed AlSadiDec 26
xcode – iOS – objective-c
Hi;
How to make fade in or fade out animation for “or on” UIImageView object in Objective-c ” iOS”
you want to use UIVew class and UIImageView object “myImage”
1- UIView : beginAnimations : context // to tell that the animation options will start !!
2- UIView setAnimationCurve // to set animation curve “fast then slow then fast etc..”
3- UIView setAnimationDuration // to set the time that the full animation will take ” from start to end”
4- UIView commitAnimations // start animating
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
//Fade Out
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:1];
[[self myImage]setAlpha:0];
[UIView commitAnimations];
//Fade in
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:1];
[[self myImage]setAlpha:1];
[UIView commitAnimations]; |
Related posts:
- objective-c ABAddressBookRef add new contact to address book xcode – objective-c Hi, iPhone and every mobile have address book that contain contacts (first...
- objective c get iTunes file sharing folder files with full path xcode – iphone – objective c Hi; the method “function” below show you how to...
- objective c get iTunes shared document directory files list xcode – iphone – objective c Hi; How to Enable iTunes “folder” file sharing: some...
- objective c documents and temp directory Xcode – Objective-c Hi, If you want to get path of documents directory , you...
- objective c iphone delete file xcode – iphone – objective c Hi; the method “function” below is an example how...
Leave a Reply