• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[iOS] Block animation kills performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iOS] Block animation kills performance


  • Subject: [iOS] Block animation kills performance
  • From: Rick Mann <email@hidden>
  • Date: Sun, 31 Jul 2011 16:20:48 -0700

Xcode 3.2.6, iOS 4.3.

My app shows a heartbeat as a flashing red square. Once each second, I execute the following code. If I use the block style, overall performance of the app suffers greatly (the UI becomes unresponsive to touches). If I animate the more traditional way, UI responsiveness seems normal.

This occurs in both the simulator and the device (iPad).

Am I doing something wrong?


- (void)
heartbeat
{
	self.heartbeatIndicator.alpha = 1.0f;

#if 0
	[UIView animateWithDuration: 0.5
			animations:
	^{
		self.heartbeatIndicator.alpha = 0.0f;
	}];
#else
	[UIView beginAnimations: @"heartbeat" context: NULL];
	[UIView setAnimationDuration: 0.5];

	self.heartbeatIndicator.alpha = 0.0f;

	[UIView commitAnimations];
#endif
}

--
Rick

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [iOS] Block animation kills performance
      • From: Hunter Hillegas <email@hidden>
  • Prev by Date: Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?
  • Next by Date: Re: [iOS] Block animation kills performance
  • Previous by thread: Re: Unnecessary Boolean Warning
  • Next by thread: Re: [iOS] Block animation kills performance
  • Index(es):
    • Date
    • Thread