Accessor Style p2

 

Middle section of Accessor Style Tab

The middle section of the Accessor Style Tab is used for Objective-C 1.0 style explicit accessors or when overriding accessors in Objective-C 2.0, but also for -dealloc and -viewDidUnload, which is used in Objective-2.0 as well.

Objective-C 1.0 style explicit accessors can also be used for Getter and Setter overrides.  Many of these options are legacy. 

Typically, users keep the defaults to


getter: “return [[object retain] autorelease];”

setter: “release / retain”


NOTE: if you are set to use Objective-C 2.0, when you generate overrides from the Action Menu and Action Panel, these settings are observed.

Even if you are set to use Objective-C 2.0, when you generate overrides from the Action Menu and Action Panel, these settings are observed.

Dealloc

Getters

Setters

The options for -dealloc {...} are many. However, for non-ARC, they are typical set to

“release”  & “object = nil;”


When ARC Aware is turned on, Core Foundation Pointer types will get their CFRelease(<object>) and set to nil. 


NSTimers will be invalidated and set to nil;

The “Always append dealloc” switch determines whether or not whenever you generate an “Implementation” action, the dealloc code (and possibly full block) will be appended to your results. 


You can always generate a -dealloc block via its own Dealloc action. See Action Menu.

The MCRelease() macro is a special case and requires a macro as described by Jeff LaMarche on his iPhone Development Blogspot:  http://iphonedevelopment.blogspot.com/2010/09/dealloc.html

If “Detect IBOutlets” is ON, Accessorizer will see if the TYPE is a subclass of NSView or UIKit and insert the IBOutlet keyword for you.  If you have a custom view, you can always tell Accessorizer to detect that custom view as an IBOutlet by entering the TYPE in the Defaults Table and switching on the IB switch.  See Defaults Table


If you manually declare the IBOutlet keyword, Accessorizer will also see that declarative and when choosing the View Did Unload action, Accessorizer will automatically nil out your views.

View Did Unload

Detect IBOutlets

Options...