Matt Gemmell

My new book CHANGER is out now!

An action-thriller novel — book 1 in the KESTREL series.

★★★★★ — Amazon

Strange behaviour with NSMenu

source 1 min read

Seems that if you call -[NSMenu indexOfItemWithTitle:] and pass an empty string (@””), it returns the index of a separatorItem if one is present, instead of -1 (not found), as I would expect. Very strange.