Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amit-battan

macrumors newbie
Original poster
Sep 10, 2009
16
0
Hi All

How be bounce our application dock icon I tried

Code:
[NSApp activateIgnoringOtherApps:YES]; 
int attentionrequest = [NSApp requestUserAttention:NSCriticalRequest];
and also this

Code:
[NSApp requestUserAttention:NSCriticalRequest];
but not works
Can any body suggest

Thanks
Amit Battan
 

amit-battan

macrumors newbie
Original poster
Sep 10, 2009
16
0
Hi All

sorry it works... my focus was on my application when I test it... Its works when my focus is not on application


Code:
[NSApp requestUserAttention:NSCriticalRequest];

Is any way to bounce the icon even focus on application...

Thanks
Amit Battan
 

chown33

Moderator
Staff member
Aug 9, 2009
10,747
8,421
A sea of green
An icon bounces in order to draw a user's attention to an app that isn't focused. For example, the app could be hidden (no windows at all).

If your app is focused, then what is a bouncing icon supposed to mean?

When your app is focused, you draw user attention to things that need immediate action by using dialogs and alerts. Conversely, if your app doesn't need immediate action by the user, then why do you need to draw their attention to it?

Don't be an attention hog.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.