Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List examples of how to "briefly draw attention" to an object on screen in iOS?

Tags:

In iOS, how can one briefly draw attention to an object on screen? Suppose, create a brief glow or cause a shadow to appear and then disappear?

For the purposes of this question, let's define "object on screen" as an instance of UIImageView.

Also, if possible provide an example of how to draw attention to a button.

like image 738
James Raitsev Avatar asked Feb 28 '12 04:02

James Raitsev


2 Answers

Most people list code, but I'm sticking to describing some examples;

  • I've seen objects briefly grow and shrink back to their normal size to draw attention
  • Bejeweled (a Popcap game) lets diamonds briefly 'shine' (as if sunlight passed over it) to give you a subtle hint
  • I've seen certain applications use a hand or a fictive character point to a certain object briefly

And of course, you could always introduce a talking paperclip to tell you what's what. enter image description here

like image 164
Jake Avatar answered Oct 13 '22 21:10

Jake


[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.1f]; yourView.transform = CGAffineTransformMakeScale(1.1, 1.1); [UIView commitAnimations]; 

Or, of course the same thing with a block animations. And after the attention got away from your view you can use :

[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.1f]; yourView.transform = CGAffineTransformIdentity; [UIView commitAnimations]; 
like image 41
Adrian Ancuta Avatar answered Oct 13 '22 21:10

Adrian Ancuta