简体   繁体   中英

Which NSTextView is the First Responder?

I'm working on a Cocoa programming exercise, and I need to be able to determine which of two NSTextView objects is currently being edited. I think it's something to do with finding the first responder and checking to see if it's equal to one text field or another, but I can't quite get it to work. Any help would be appreciated.

I suggest you to read the Cocoa Event-Handling Guide , and especially the section called Responder-Related Tasks . You will find all the information you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM