starting at the end - yes, I did notice the errors in the removeObserver code (removing the "WillShowNotification" and "WillHideNotification" methods when what was actually added earlier were the "DidShow" and "DidHide" notifications - a glaring mismatch) - and it threw me for yet another frustrating loop till I figured it out.
(I must say, I'm becoming more and more "impressed" with how little care the Author or Publishers of this book seemed to have had when putting it out. SO MANY code errors... Or Apps that crash even though the code was typed in exactly as appears in the book...)
In terms of the "return" statement - understood :-)
I also looked it up in the Kochan Objective-C book (a wonderful, error-free
) - and right there in Appendix B it goes through all the different type of "Statements" there are and for "The Return Statement" it states: "Execution of the return statement causes program execution to be immediately returned to the calling function or method."
So I was like "oh....duh!!!
Well, hopefully someone else down the line will benefit from this and all our other posts and "duhs"
I'm now on Chapter 15 and currently experiencing one of those inexplicable App-crashes - even though I typed the code in exactly as it appears in the book...
May be posting about that soon - stay tuned