diff --git a/Cocoa Programming Guidelines.pdf b/Cocoa Programming Guidelines.pdf index 5fc88ce..f746994 100644 Binary files a/Cocoa Programming Guidelines.pdf and b/Cocoa Programming Guidelines.pdf differ diff --git a/Cocoa Programming Guidelines.tex b/Cocoa Programming Guidelines.tex index b1acec1..81c2eba 100644 --- a/Cocoa Programming Guidelines.tex +++ b/Cocoa Programming Guidelines.tex @@ -23,6 +23,7 @@ \usepackage[framemethod=TikZ]{mdframed} \usepackage{hyperref} \usepackage{tabto} +\usepackage{minted} % Define section, subsection and subsubsection font size and color @@ -84,9 +85,10 @@ % Lists a code inside of a blue border \definecolor{BaliHaiColor}{HTML}{7CA1B3} -\newenvironment{codelisting} -{\footnotesize\mdframed[middlelinewidth=0.5pt, middlelinecolor=BaliHaiColor, skipabove=15pt]\verbatim} -{\endverbatim\endmdframed\vspace{12pt}\normalsize} +\newminted[codelisting]{objective-c}{tabsize=4, fontsize=\footnotesize} +\usemintedstyle{xcode} +\BeforeBeginEnvironment{codelisting}{\footnotesize\mdframed[middlelinewidth=0.5pt, middlelinecolor=BaliHaiColor, skipabove=15pt]}% +\AfterEndEnvironment{codelisting}{\endmdframed\vspace{12pt}\normalsize} % Lists text inside yellow border @@ -384,7 +386,7 @@ This approach has one more advantage, it is easier to add an error handling late if (error != NULL) *error = [NSError errorWithDomain:ExampleDomain code:1001 - userInfo:@{NSLocalizedDescriptionKey: @"User name must have..."}]; + userInfo:@{NSLocalizedDescriptionKey: @"User has to..."}]; return NO; } @@ -392,11 +394,11 @@ This approach has one more advantage, it is easier to add an error handling late if (error != NULL) *error = [NSError errorWithDomain:ExampleDomain code:1002 - userInfo:@{NSLocalizedDescriptionKey: @"Password must have..."}]; + userInfo:@{NSLocalizedDescriptionKey: @"Password has to..."}]; return NO; } - // logging in code + // actual logging code } \end{codelisting}