• 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
Re: Removing delay for a menu in NSSegmentedControl?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing delay for a menu in NSSegmentedControl?


  • Subject: Re: Removing delay for a menu in NSSegmentedControl?
  • From: Dave Keck <email@hidden>
  • Date: Mon, 25 May 2009 09:35:23 -1000

> Right now, there is about about a 1-second delay after a click on a
> segment before its menu will appear.
>
> Is there a way to remove this delay in bringing up a menu attached to a segment?

This isn't typical - if you create a new project and just drop a NSSC
in a window, you'll see there's no delay.

You probably have something executing when the user clicks on it, and
so the NSSC isn't redrawn to reflect its new state until this code
finishes. Your best option in this case is to perform these actions in
the next iteration of the run loop. This can be done using a timer:

[NSTimer scheduledTimerWithTimeInterval: 1.0 target: self selector:
@selector(performClickActions) userInfo: nil repeats: NO];

Which will give the NSSC a chance to update immediately.

David
_______________________________________________

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: Removing delay for a menu in NSSegmentedControl?
      • From: Mark Munz <email@hidden>
References: 
 >Removing delay for a menu in NSSegmentedControl? (From: Mark Munz <email@hidden>)

  • Prev by Date: Re: which temp dir to use?
  • Next by Date: Re: which temp dir to use?
  • Previous by thread: Removing delay for a menu in NSSegmentedControl?
  • Next by thread: Re: Removing delay for a menu in NSSegmentedControl?
  • Index(es):
    • Date
    • Thread