How we get bounce in our application dock icon

Discussion in 'Mac Programming' started by amit-battan, Jan 8, 2010.

  1. amit-battan macrumors newbie

    Joined:
    Sep 10, 2009
    #1
    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
     
  2. amit-battan thread starter macrumors newbie

    Joined:
    Sep 10, 2009
    #2
    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
     
  3. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #3
    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.
     

Share This Page