Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-28-2011, 06:26 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 498
nick.keroulis is on a distinguished road
Default Effects: Fade from Image1 to Image2.

I don't want to use the simple transition from one image to another.
I want the image1 to fade to image2.
__________________
iDamaged Hands-On Preview. I like this game check it out.
nick.keroulis is offline   Reply With Quote
Old 05-28-2011, 06:44 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Code:
-(void)fadeView:(UIView *)view fadein:(BOOL)fade timeAnimation:(NSTimeInterval)timeAnim{
	
	if(fade){
		view.alpha = 0;
		[UIView beginAnimations:nil context:nil];
		[UIView setAnimationDuration:timeAnim];
		[UIView setAnimationDelegate:self];
		view.alpha = 1;
		[UIView commitAnimations];
	}else {
		[UIView beginAnimations:nil context:nil];
		[UIView setAnimationDuration:timeAnim];
		[UIView setAnimationDelegate:self];
		view.alpha = 0;
		[UIView commitAnimations];
	}
	
}
call it
Code:
[self.view addSubview:myImageView2];
[self fadeView:myImageView2 fadein:YES timeAnimation:1.0];
__________________

Last edited by dany_dev; 05-28-2011 at 06:49 AM.
dany_dev is offline   Reply With Quote
Old 05-28-2011, 07:10 AM   #3 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 498
nick.keroulis is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
Code:
-(void)fadeView:(UIView *)view fadein:(BOOL)fade timeAnimation:(NSTimeInterval)timeAnim{
	
	if(fade){
		view.alpha = 0;
		[UIView beginAnimations:nil context:nil];
		[UIView setAnimationDuration:timeAnim];
		[UIView setAnimationDelegate:self];
		view.alpha = 1;
		[UIView commitAnimations];
	}else {
		[UIView beginAnimations:nil context:nil];
		[UIView setAnimationDuration:timeAnim];
		[UIView setAnimationDelegate:self];
		view.alpha = 0;
		[UIView commitAnimations];
	}
	
}
call it
Code:
[self.view addSubview:myImageView2];
[self fadeView:myImageView2 fadein:YES timeAnimation:1.0];
I don't want to change from one view to another but from an image (in a UIImageView) to another and do that over and over again...
__________________
iDamaged Hands-On Preview. I like this game check it out.
nick.keroulis is offline   Reply With Quote
Old 05-28-2011, 09:23 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

this allow you to do that, just use 2 uiimageview with the same rect, and when fade is completed remove the second uiimageview (that is behind the new uiwebview that fade-in)
__________________
dany_dev is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 348
6 members and 342 guests
doffing81, dre, iOS.Lover, jenniead38, Kirkout, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:14 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0