21st August 2009, 07:38 pm
iPhone learning continues apace. Today I discovered a surprising interaction between tab bars and action sheets. This is worth remembering for my own sake, but I think it’s also worth passing on for three reasons. First, if you happen to have just this problem, I can save you some time. Second, it illustrates how looking at something can lead us to jump to wrong conclusions. Finally, it points out that in our wonderful new technological world, we have to deal regularly with a nightmare of crazy detail.
Continue reading ‘Mixing Tab Bars and Action Sheets’ »
10th August 2009, 07:53 pm
I’ve started learning how to program the iPhone. It’s a very interesting beast.
My first application uses the built-in UIDatePicker object (that’s the slot machine with wheels for picking a date). I want my app to handle historical times, so I scrolled the wheel for the year back a couple of centuries, and noticed some very strange behavior. When you ask the date picker for the selected date, you get back an NSDate object. If you print that out, then you’ll find that the date you get back sometimes does NOT match the date on the wheels. This is of course a disaster for any application. Try it yourself: spin the wheels around to May 15, 1152, and check the NSDate returned by the picker object: you’ll get May 8, 1153. One year and 7 days wrong.
And unfortunately, as you move around you’ll find the days continue to shift: May 15 in the year 852 reports as May 11, 853. Now one year and 4 days wrong. It’s a problem, but we can fix it. Continue reading ‘The Curious UIDatePicker’ »