A simple CoreMIDI example, demonstrating the common 'Midi Learn' feature.
The example Xcode project contains MIDILearnViewController, a UIViewController subclass that handles the entire learn operation:
- Setup a Midi client on the main thread.
- Parse Midi information in the callback.
- Send results back onto the main thread.
- Dispose of the Midi client, on the main thread.
A protocol named MIDILearnViewControllerDelegate has been declared, along with a weak property reference named delegate, and can be used to inform the presenting view controller (or any object that your heart desires) of the results.