I’m working on chapter 6, Subclassing UIView, of iPhone Programming
by Joe Conway and Aaron Hillegass1 to learn iOS programming. There’s a deprecated method in the code for hiding the status bar in the Hypnosister app. Xcode 4 generates a warning that UIApplication setStatusBarHidden:animated: is deprecated.
One of the ways I make sure I’m understanding the material rather than just typing in examples is to chase down issues like this. Here’s how I did it: I selected the method, setStatusBarHidden, in the code and used the “Jump to Definition” feature (control-command-D or Navigate|Jump to Definition on the menu). That brought up the source for the method. The comment at the end told me to use -setStatusBarHidden:withAnimation:. Using the code completion feature I changed the original line:
[Read more…]