Protocol Stubs

 

Accessorizer makes it very easy to stub out method declarations or to go in reverse, from method definitions to method declarations.  The same action handles both directions.

Example: Let’s say you have the following method declarations.

You select them and invoke the Accessorizer Action Panel service via

shift-option-cmd-0

(shift option command zero) See Setup.

Move your insertion point in Xcode to where you want the results, bring up the Action Menu (or Action Panel) and select the shortcut “g” for Protocol stubs.

Your results should look like this:

- (BOOL)shouldCreateSequence:(QVNeuralSequence) *sequence inLoop:(QVNeuralLoop) *loop {

   

    return <#someValue#>;

} //shouldCreateSequence:inLoop:


- (BOOL)willCreateSequence:(QVNeuralSequence) *sequence inLoop:(QVNeuralLoop) *loop {

   

    return <#someValue#>;

} //willCreateSequence:inLoop:


- (BOOL)didCreateSequence:(QVNeuralSequence) *sequence inLoop:(QVNeuralLoop) *loop {

   

    return <#someValue#>;

} //didCreateSequence:inLoop:


- (void)didEndPlaybackForSequence:(QVNeuralSequence *)sequence {

   

} //didEndPlaybackForSequence:

NOTE: the trailing method signature is optional.  (See Formatting page)

As mentioned above, this action works in both directions as shown in this short video clip: