Property's default values are documented conditionally.

This commit is contained in:
Wojciech Nagrodzki 2014-02-22 12:35:06 +01:00
parent 511ad4980d
commit 5b4c7f9adf
Signed by: wnagrodzki
GPG key ID: E9D0EB0302264569
2 changed files with 19 additions and 9 deletions

Binary file not shown.

View file

@ -451,16 +451,26 @@ A delegation method passes the sender as the first parameter. It is a good pract
\end{codelisting}
%\subsection{Lallal}
%
%a
%
%\begin{codelisting}
%@property (nonatomic) CGGradientRef tileGradient; // default: a lovely blue
%@property (nonatomic) NSInteger selectionBorderWidth; // default: 5 pixels
%@property (nonatomic) CGGradientRef selectionGradient; // default: a subtle white to grey gradient
%\end{codelisting}
\subsection{Property's default values are documented conditionally}
The alloc method clears out the memory allocated for an objects properties, by setting it to zero. If a property value is not altered during the initialization, a note about its default value may be omitted.
\begin{codelisting}
/*
* A Boolean value that determines whether the view is hidden.
*/
@property(nonatomic, getter=isHidden) BOOL hidden // represented by zeroed memory
\end{codelisting}
On the contrary, if the default value is changed, a mention about it is included.
\begin{codelisting}
/*
* Defines the anchor point of the layer's bounds rectangle.
* The default value of this property is (0.5, 0.5).
*/
@property (nonatomic) CGPoint anchorPoint // not represented by zeroed memory
\end{codelisting}
\subsection{Init methods take only mandatory parameters}