开发者

NSSearchField: how long is the search delay? Is it configurable?

NSSearchField allows you to uncheck "search immediately" in the Interace Builder attributes editor. Wh开发者_Go百科en this is the case, the target action will not be invoked until a short time after the user stops typing.

  1. Exactly how long is this delay?
  2. Is this delay configurable? If so how?


I don't believe the delay is configurable. What you could do is set the text field to search immediately but then override -textDidChange: in a subclass of NSSearchFieldCell.

You could then control the search delay using an NSTimer or some other method and call super's implementation of -textDidChange: when you want to trigger the search.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜