Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Alright, this should be fun!</p> <p>Step one: Change the method signature of <code>removeQuartzPlayer</code> to be:</p> <pre><code>-(void)removeQuartzPlayer:(id)aPlayer; </code></pre> <p>Where <code>aPlayer</code> will be the player you want to remove. Change the implementation to look something like this:</p> <pre><code>[quartzPlayerArrayController removeObject:aPlayer]; </code></pre> <p>Where <code>quartzPlayerArrayController</code> would be replaced with the name of the outlet to the NSArrayController that your collection view is connected to. I'll trust that you can figure out how to create an IBOutlet to it, if you don't already have one.</p> <p>Step one-point-five: remove the connection between the button and the <code>removeQuartzPlayer</code> method in IB.</p> <p>Step two: Switch to the Bindings pane of the IB Inspector. Select the "Target" binding and make it look like this:</p> <p><img src="https://i.stack.imgur.com/AxHIh.png" alt="IB Bindings pane 1"></p> <p>Where the "Controller" popup would be set to whatever object points to your controller.</p> <p>Step three: Select the "Argument" binding and make it look like this:</p> <p><img src="https://i.stack.imgur.com/Y6l3P.png" alt="IB Bindings pane 2"></p> <p>Where the "Collection View Item" popup... you get the idea.</p> <p>Step four: Enjoy your new button, brought to you by the (dark) magic of Cocoa Bindings!</p> <p>Disclaimer: I haven't actually tested this, but since I have a button that does something similar, it should work. Comment away if I've screwed something up.<br> Billy</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload