{"id":6524,"date":"2012-11-09T16:43:35","date_gmt":"2012-11-09T21:43:35","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=6524"},"modified":"2012-11-09T16:43:35","modified_gmt":"2012-11-09T21:43:35","slug":"protocol-data-types","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2012\/11\/09\/protocol-data-types\/","title":{"rendered":"Protocol Data Types"},"content":{"rendered":"<p><a href=\"http:\/\/blog.hawkimedia.com\/2012\/11\/pro-tip-data-types-matter\/\">Mark Granoff<\/a>:<\/p>\n<blockquote cite=\"http:\/\/blog.hawkimedia.com\/2012\/11\/pro-tip-data-types-matter\/\"><p>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.<\/p><\/blockquote>\n<p>This is the sort of mistake that Xcode should be able to catch but can&rsquo;t yet. The commenters suggest using Xcode&rsquo;s code completion to avoid this typing in the first place.<\/p>","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[69,71],"class_list":["post-6524","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=6524"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6524\/revisions"}],"predecessor-version":[{"id":6525,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6524\/revisions\/6525"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=6524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=6524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=6524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}