Delegate Stubs

 

Accessorizer can generate delegate stubs for you. 

Let’s say you have some protocol methods for a class and you want to make sure your delegate can respond to the messages. 


Select your protocols and invoke the Accessorizer Action Panel service (see Setup)

Bring up the Action Panel and select the shortcut “f” for Delegate Stubs.

Accessorizer will generate conditional clauses for you with placeholders for values:


if (self.delegate && [self.delegate respondsToSelector:@selector(shouldCreateSequence:inLoop:)]) {

   

    BOOL <#returnValue#> = [self.delegate shouldCreateSequence:<#(QVNeuralSequence)*sequence#> inLoop:<#(QVNeuralLoop)*loop#>];

} //shouldCreateSequence:inLoop:



if (self.delegate && [self.delegate respondsToSelector:@selector(willCreateSequence:inLoop:)]) {

   

    BOOL <#returnValue#> = [self.delegate willCreateSequence:<#(QVNeuralSequence)*sequence#> inLoop:<#(QVNeuralLoop)*loop#>];

} //willCreateSequence:inLoop:



if (self.delegate && [self.delegate respondsToSelector:@selector(didCreateSequence:inLoop:)]) {

   

    BOOL <#returnValue#> = [self.delegate didCreateSequence:<#(QVNeuralSequence)*sequence#> inLoop:<#(QVNeuralLoop)*loop#>];

} //didCreateSequence:inLoop:



if (self.delegate && [self.delegate respondsToSelector:@selector(didEndPlaybackForSequence:)]) {

   

    [self.delegate didEndPlaybackForSequence:<#(QVNeuralSequence*)sequence#>];

} //didEndPlaybackForSequence:

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