Friday, November 9, 2012 [Tweets] [Favorites]

Protocol Data Types

Mark Granoff:

As almost a last ditch effort, I carefully reviewed the implementations of all my UITableView delegate and data source methods. Sure enough, I found I had implemented the above method with the wrong return value. And when I changed it to correctly return an NSInteger instead of a CGFloat, all was right with the world.

This is the sort of mistake that Xcode should be able to catch but can’t yet. The commenters suggest using Xcode’s code completion to avoid this typing in the first place.

1 Comment

I thought this was supposed to be solved with delegate methods now being made into protocols, and in this case, the method is required, so one should get a warning that a method is missing. I need to give it a look again...

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment