mirror of
https://github.com/wnagrodzki/CocoaProgrammingGuidelines.git
synced 2025-05-03 17:41:51 +02:00
Updates "Properties can be added to existing classes" section.
This commit is contained in:
parent
fab399def1
commit
34d085898b
2 changed files with 1 additions and 6 deletions
Binary file not shown.
|
@ -714,12 +714,7 @@ static void * const navigationItemKey = (void *)&navigationItemKey;
|
|||
\begin{codelisting}
|
||||
- (UINavigationItem *)navigationItem
|
||||
{
|
||||
UINavigationItem * navigationItem = objc_getAssociatedObject(self, navigationItemKey);
|
||||
if (navigationItem == nil) {
|
||||
navigationItem = [[UINavigationItem alloc] init];
|
||||
self.navigationItem = navigationItem;
|
||||
}
|
||||
return navigationItem;
|
||||
return objc_getAssociatedObject(self, navigationItemKey);
|
||||
}
|
||||
\end{codelisting}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue