{"action":"created","issue":{"url":"https://api.github.com/repos/forkingdog/UITableView-FDTemplateLayoutCell/issues/144","labels_url":"https://api.github.com/repos/forkingdog/UITableView-FDTemplateLayoutCell/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/forkingdog/UITableView-FDTemplateLayoutCell/issues/144/comments","events_url":"https://api.github.com/repos/forkingdog/UITableView-FDTemplateLayoutCell/issues/144/events","html_url":"https://github.com/forkingdog/UITableView-FDTemplateLayoutCell/issues/144","id":123224501,"number":144,"title":"导致sd_webImageView加载图片失败","user":{"login":"FutureChen","id":8944181,"avatar_url":"https://avatars.githubusercontent.com/u/8944181?v=3","gravatar_id":"","url":"https://api.github.com/users/FutureChen","html_url":"https://github.com/FutureChen","followers_url":"https://api.github.com/users/FutureChen/followers","following_url":"https://api.github.com/users/FutureChen/following{/other_user}","gists_url":"https://api.github.com/users/FutureChen/gists{/gist_id}","starred_url":"https://api.github.com/users/FutureChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FutureChen/subscriptions","organizations_url":"https://api.github.com/users/FutureChen/orgs","repos_url":"https://api.github.com/users/FutureChen/repos","events_url":"https://api.github.com/users/FutureChen/events{/privacy}","received_events_url":"https://api.github.com/users/FutureChen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-21T07:29:37Z","updated_at":"2015-12-21T15:51:46Z","closed_at":null,"body":"发现了一个非常极端的BUG\r\n当使用了FD，并且设置了 tableView.estimatedRowHeight ，会导致sd_web有些图片加载不出来，需要滑动列表才会显示出来。\r\n比如我的情况，tableView的head 高度150， cell 高度 280，第二个cell正好处于显示半个的情况，那么第二个cell的图片100%不加载。其他cell的图片也存在不规则的不加载。\r\n如果不设置tableView.estimatedRowHeight 则不会触发这个BUG，不使用FD也不会触发，不知道FD和SD的算法产生了什么冲突。\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/forkingdog/UITableView-FDTemplateLayoutCell/issues/comments/166337683","html_url":"https://github.com/forkingdog/UITableView-FDTemplateLayoutCell/issues/144#issuecomment-166337683","issue_url":"https://api.github.com/repos/forkingdog/UITableView-FDTemplateLayoutCell/issues/144","id":166337683,"user":{"login":"QiuZhiFei","id":3402799,"avatar_url":"https://avatars.githubusercontent.com/u/3402799?v=3","gravatar_id":"","url":"https://api.github.com/users/QiuZhiFei","html_url":"https://github.com/QiuZhiFei","followers_url":"https://api.github.com/users/QiuZhiFei/followers","following_url":"https://api.github.com/users/QiuZhiFei/following{/other_user}","gists_url":"https://api.github.com/users/QiuZhiFei/gists{/gist_id}","starred_url":"https://api.github.com/users/QiuZhiFei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QiuZhiFei/subscriptions","organizations_url":"https://api.github.com/users/QiuZhiFei/orgs","repos_url":"https://api.github.com/users/QiuZhiFei/repos","events_url":"https://api.github.com/users/QiuZhiFei/events{/privacy}","received_events_url":"https://api.github.com/users/QiuZhiFei/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T15:51:45Z","updated_at":"2015-12-21T15:51:45Z","body":"SDWebImage 的问题 .. \r\n\r\n原因：\r\nUITableView-FDTemplateLayoutCell 高度是根据 tempCell 计算，计算高度时 heightForRowAtIndexPath 里的 tempCell 的 imageview 加载图片1，展示的cellForRowAtIndexPath 的 cell 也加载图片1 … 然后当 tempCell 又去加载别的图片 .. cancel 了 加载图片1的 operation .. \r\n\r\n解决方案：\r\n在heightForRowAtIndexPath 的 fd_heightForCellWithIdentifier 的 配置 cell 的方法里只加载数据，不加载图片 ... 在 cellForRowAtIndexPath 里的 fd_heightForCellWithIdentifier 才加载图片 ~\r\n"}}