Post

Replies

Boosts

Views

Created

Xcode - Buttons are being clipped by container - how to stop it?
I have a row of NSButtons inside an NSBox that is embedded into a Container View. What constraints do I implement so my row won't be clipped by the parent Container? The items on Storyboard versus how the buttons are clipped when running the program: https://im gur.com/NubUa4G https://im gur.com/eo5b89u The following is a standard configuration for a button - I would like same widths and heights and xy location, they can dynamically move as long as they maintain a square shape upon resize. https:// i.imgur.com/T3NDjlI.png Note: this is on MacOS, not iOS (so AppKit instead of UIKit)
0
0
367
May ’21
Configuring MIDiSysexSendRequest (Data types)
I would like to send a MIDISysex using the CoreMIDI API. I do not know how to fill out the last two data types in the struct, prompting errors in Xcode. The struct: struct MIDISysexSendRequest{ MIDIEndpointRef destination; const Byte * data; UInt32 bytesToSend; Boolean complete; Byte reserved[3]; MIDICompletionProc completionProc; void * completionRefCon;}; Both the completionProc and the completionRefCon have to be initialized to something. Does anybody know what? As an example, var completionProc = MIDICompletionProc() brings the error: Non-nominal type 'MIDICompletionProc' does not support explicit initialization. EDIT: the MIDICompletionProc can be filled by defining a function, e.g. func MIDICompletionProc(request: UnsafeMutablePointerMIDISysexSendRequest) - Void { } Which leaves how to initialize the completionRefCon.
1
0
751
May ’21