• 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: How to tell if first responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to tell if first responder


  • Subject: Re: How to tell if first responder
  • From: Scott Little <email@hidden>
  • Date: Wed, 12 May 2004 15:43:26 +0200

Bjvrn,

if ([[self window] firstResponder] == self) {
// this view is the firstResponder
}

scott

Quoting Bjvrn Carlstrvm <email@hidden>:

> This might seem like a simple question but I can't find the answer
> anywhere in the documentation. When drawing a custom view, i want to
> draw highlights differently if it is the first responder. How can I
> tell if a view is the first responder from its drawRect: method?
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
>
>


--
Scott Little
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >How to tell if first responder (From: Björn Carlström <email@hidden>)

  • Prev by Date: Corrupt Project Index in XCode [Was "What in the world?"]
  • Next by Date: [NSWorkspace fullPathForApplication:] : Classic forever?
  • Previous by thread: Re: How to tell if first responder
  • Next by thread: [NSWorkspace fullPathForApplication:] : Classic forever?
  • Index(es):
    • Date
    • Thread