mirror of
https://github.com/wnagrodzki/CocoaProgrammingGuidelines.git
synced 2025-05-06 19:11:47 +02:00
Minor corrections
This commit is contained in:
parent
444f9156bb
commit
144376d4e7
2 changed files with 10 additions and 3 deletions
Binary file not shown.
|
@ -126,7 +126,7 @@
|
||||||
|
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
||||||
\section{Visual Appearance}
|
\section{Code Appearance}
|
||||||
|
|
||||||
|
|
||||||
Hardly any software is maintained for its whole life by the original author. Writing code in unified way helps engineers to understand it more quickly.
|
Hardly any software is maintained for its whole life by the original author. Writing code in unified way helps engineers to understand it more quickly.
|
||||||
|
@ -499,8 +499,15 @@ Instance subclasses may be in an inconsistent state during init and dealloc meth
|
||||||
Creating instances of abstract classes can be thwarted with following assertion.
|
Creating instances of abstract classes can be thwarted with following assertion.
|
||||||
|
|
||||||
\begin{codelisting}
|
\begin{codelisting}
|
||||||
NSAssert1([self isMemberOfClass:[MyAbstractClass class]] == NO,
|
- (id)init
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
NSAssert1([self isMemberOfClass:[MyAbstractClass class]] == NO,
|
||||||
@"%@ is an abstract class. Please do not create instances of it.", [self class]);
|
@"%@ is an abstract class. Please do not create instances of it.", [self class]);
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
\end{codelisting}
|
\end{codelisting}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue