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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 01-31-2010, 06:22 PM   #1 (permalink)
WHY SO SERIOUS
 
UMAD's Avatar
 
Join Date: Mar 2009
Posts: 128
Unhappy Really weird problem after doing a transform on a UIButton! Calling out the gurus!

So I have this button with some text in it (title). And I would like to do a transform on it once it is loaded. The transform bounces the button just like the popup you get on the iPhone. The problem is once the transform/animation is done the whole button becomes blurry.

Here is before a transform:


And here is after:


The button is located at x 10, y 100, with w 300, h 190

And here is the code that does the transform

Code:
- (void)bounce1AnimationStopped {
	[UIView beginAnimations:nil context:nil];
	[UIView setAnimationDuration:kTransitionDuration/2];
	[UIView setAnimationDelegate:self];
	[UIView setAnimationDidStopSelector:@selector(bounce2AnimationStopped)];	
	randomButton.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.9, 0.9);		
	[UIView commitAnimations];
}

- (void)bounce2AnimationStopped {
	[UIView beginAnimations:nil context:nil];
	[UIView setAnimationDuration:kTransitionDuration/2];
	randomButton.transform = CGAffineTransformIdentity;	
	[UIView commitAnimations];
}

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
	
	randomButton.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);	
	randomButton.hidden = NO;

	[UIView beginAnimations:nil context:nil];
	[UIView setAnimationDuration:kTransitionDuration/1.5];
	[UIView setAnimationDelegate:self];
	[UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped)];	
	randomButton.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);		
	[UIView commitAnimations];	
    [super viewDidLoad];
}
As you can see, the button at the last animation is set to identity which should transform it back to the original.

Any help would be highly appreciated. Im pulling my hair here!!
UMAD is offline   Reply With Quote
Old 01-31-2010, 06:40 PM   #2 (permalink)
WHY SO SERIOUS
 
UMAD's Avatar
 
Join Date: Mar 2009
Posts: 128
Default

Got it sorted out . It seems the "Auto-resize subviews" was checked for the view. When I disabled it, the problem went away!
UMAD is offline   Reply With Quote
Reply

Bookmarks

Tags
blurry, transform, uibutton

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: 259
18 members and 241 guests
14DEV, @sandris, ADY, ArtieFufkin10, bookesp, ckgni, Dani77, DarkAn, HemiMG, iDifferent, jakerocheleau, JasonR, prchn4christ, Rudy, ryantcb, Speed, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

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