Can someone please guide me on this?
Chapter 9: Notification and Rotation (2nd edition page 161)
how is the the method [color=#008040]orientationChanged:[/color] being used without being declared in the .h file?
[color=#008040]orientationChanged:[/color] is implemented in [color=#008000]HeavyRotationAppDelegate.m[/color] as seen below.
// log the constant that represents the current orientation
NSLog(@“orientation changed: %d”, [[note object] orientation]);
and invoked in the same class file.
Earlier I tried writing a method in Hypnosis.m without declaring it in .h file. I tried calling that method (in the same class file) and got nasty errors. Errors went away only after I declared the method in the .h.
my method looked like this
// do something
and called as [color=#FF8000] r = [self checkaxis];[/color] // self is the HypnosisView.m