02 Jan 2013, 20:34
Generic-user-small

Matt Dickenson (1 post)

I’m on section 3.3, adding the UITabBarController. When I run @rake@, the app pops up in the simulator as shown in the picture on page 36. However, taking any action–including tapping “Top Color” changes the title of the @top_controller@ from “Top Color” to “Detail”.

Am I making a mistake, or is there something about iOS that changes titles back to their defaults (that needs to be overridden)?

Maybe this is addressed later in the book but I didn’t see it when quickly glancing through the remainder of the chapter.

14 Jan 2013, 22:54
Watermark copy 2_test_pragsmall

Clay Allsopp (8 posts)

Hey Matt,

I just got notified of this, sorry for the delay. Can you compare your source to the code in http://pragprog.com/titles/carubym/source_code ?

Specifically the ./code/ColorViewer_tab project, I can’t reproduce exactly the behavior you’re experiencing :(

15 Jan 2013, 12:51
Sleepingstu_pragsmall

Stuart Chinery (3 posts)

I had this same problem and after checking the source code (code/controllers/ColorViewer_tab) it appears that the line @self.title = “Detail”@ is in the wrong method in the book.

Page 33 in the book says to put this line in the ColorDetailController’s @viewDidLoad@ method where as the source code has it in the @initWithColor@ method.

I switched mine and it worked as expected.

  You must be logged in to comment