NEW: Subscribe to Hacking with Swift+ and accelerate your learning! >>

How to create a NSSearchField outlet for item in the toolbar?

Forums > macOS

Using Xcode 11/12 I want to create an outlet for a searchField located in the toolbar in the view controller.

Tried control drag to the class for the view controller but that did not work.

I know how to create action outlets for toolbar items but in this case I want to create a NSSearchField outlet in my view controller.

How is this done?


Hacking with Swift is sponsored by NSSpain

SPONSORED Announcing NSSpain 2020: Remote Edition! An online, continuous conference for iOS developers. We’ll start on Thursday and finish on Friday, with talks, activities, and lots of fun for 36 hours, non-stop. Sound good? Join us!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

Not logged in

Log in

Link copied to your pasteboard.