Do you have an app where the row heights in a table view shift, especially when navigating away from a view controller? This seems to be an iOS bug and is caused by using autolayout within a table cell without a tableView:estimatedHeightForRowAtIndexPath: method.
Tag: iOS Development
Jon Friskics suggets Swift is great, but you should still know Objective-C first. Dave Mark agrees. Let me give you a different opinion: No, newbie, you don’t need to learn Objective-C first. You’ll miss it from time to time and you might want to pick it up later, but it won’t help you much now.… Continue reading Learn Swift
Debugging app upload
I’ve had some recent troubles trying to upload a build in Xcode. These involved getting a really unhelpful error from Xcode: “No identities were available.” Unfortunately, I was stuck there for two days. It turns out that you can get Xcode to log more information on the handshake with the portal. Quit Xcode, then run… Continue reading Debugging app upload
A coworker sent me a link to this posting on the state of libraries on iOS. I sent back a quick reply, with the intent to write a blog post on the subject later. I’ve since decided that this replay says almost everything I wanted to say, so I decided to just edit it a… Continue reading On Frameworks
Change back button title
When you’re using a navigation controller, the title of the back button on a particular view controller is pulled from the view it leads to. Although this can be initially confusing, this actually makes a lot of sense. If two different view controllers (say, Circles and Squares) might push the same view controller (Details), shouldn’t… Continue reading Change back button title
Check your thread
When you start using Grand Central Dispatch or NSOperation, you’ll want to perform some actions on the main thread and some intentionally off the main thread. This is a simple and obvious technique, but it took me a while to adopt it: You can do by asserting with NSAssert or NSCAssert for [NSThread isMainThread], just… Continue reading Check your thread
Assertions are a great tool. As an Objective-C programmer, I use NSAssert and NSCAssert liberally. For various reasons, you sometimes can’t use NSAssert in a block easily. I’m going to explain why and describe a new macro, BlockAssert, which solves this.
Over the years I have tweaked which compiler warnings I use. There’s one in particular that I used to turn on but will turn off from now on: GCC_WARN_SHADOW. GCC_WARN_SHADOW is essentially drawing your attention to you possibly doing something other than you intended. This is like most warnings, but the difference is that the… Continue reading Against GCC_WARN_SHADOW
Apple has a sample code package called Reachability. It wraps an iOS framework called SystemConfiguration, and can be used to determine network status, and catch events about networking going up and down. In the past, it’s been an ugly chunk of sample code, but it’s pretty respectable now. One thing Reachability is not, however, is… Continue reading Reachability
View Controller Lifecycle in iOS 6
I previously wrote about breaking the old pattern of writing viewDidUnload. The other half of that is the new reality, which Joe Conway’s written about in View Controller Lifecycle in iOS 6.