iOS development frustrations
Popped a new theme on the blog today, was time for a bit of an update. Let me know if there’s any issues.
Now on to the main story.
I’ll prefix this with a note saying that I’m really enjoying iOS development, and the SDK is nearly perfect.
And now on to the frustrations.
When using a UITableView with headers, there is absolutely no way to adjust the tint colour on the header lines. The app I’m currently working on has colour adjustments everywhere and this is the one place I can’t just adjust the tint. To get around this, I had to create a 1 pixel wide image (stretched to the full width) and set the gradient to be similar to the default, but with our colours on it. A nasty hack really when every other control that I’ve come across so far has a tint property.
Popping up a UIPickerView on the iPad is very frustrating. I set the size and nope, it doesn’t resize for me. Ultimately I had to do a hack and create another UIView in the XIB file and pop that up in the correct location. Not too big a hack, but would be nice to click a button, have the picker show up, and hit ok. Much like a combo box does in a web page.
UIWebView doesn’t seem all that stable. If you have it pop up in a UINavigationController stack, then go back to the previous view, sometimes your app will crash. You have to manually tell it to stop loading the page before navigating away.
When using a UITabBarController, it’d be nice if you set the property on the tab bar ‘hidden’ to YES and it would actually hide and resize the main view to fit. In my case, I don’t want the tab bar showing when the iPhone is being held horizontally as it takes up a lot of screen real estate. I’m yet to find a clean way to not show it. I’m doing various hacks like setting the hidesBottomBarWhenPushed on the view to false then forcing the UINavigationController stack to reinitialise itself (by grabbing the whole stack as an array, then resetting it back in), but it doesn’t work all the time (in particular when a couple of screens deep into the navigation).
The simulator has some frustrations too. My biggest one coming from the fact that I’m developing a network app. There is no way to simulate a slow connection or a network timeout from the simulator. I ended up tethering one iPhone to another and toggling the flight mode to have the network drop out, then toggling it back on to have the network come back up. This wasn’t without frustration either, quite a number of times, it didn’t want to reconnect to the phone until I exited the app and headed back into settings (yes, I had “remember this connection” enabled).
Overall however, Apple has done a pretty good job with the iOS SDK, there’s just a couple of frustrating fundamental items missing.