Christian Tietze

  • Blog Posts
  • Writing
  • Apps
  • Work With Me
  • Contact

Find Swift Classes from Objective-C Tests

Nov 29th, 2018

When you write a Swift type, you should prefer to write its tests in Swift, too. In a mixed-language code base, you will run into the situation where your Objective-C tests need to reference Swift types to initialize and pass to the object under test. That’s a different story. But you cannot import the generated -Swift.h out-of-the-box:

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • objc
    • swift
    • testing

Fix NSSegmentedControl Action Forwarding from Your NSToolbar

Nov 23rd, 2018

Teaser image

Two years ago, I wrote about how I implemented a toolbar with NSSegmentedControl, much like Apple’s own apps have them since macOS 10.11 Yosemite. Last week I discovered my implementation was buggy: it did not work at all when you customize the toolbar to show “Icon Only”, i.e. hide the label text.

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • toolbar
    • appkit
    • nssegmentedcontrol

Contact • Newsletter • Blog Feed • /feeds • /now • /uses • @ctietze@mastodon.social • Privacy & Legal Information

Except where otherwise noted, content on this site is licensed CC BY-SA 4.0.

As an Amazon Associate I earn from qualifying purchases. This e.g. applies to links to Amazon.com.