7

I have an app where I display posts from a user's news feed in a UITableView. I use a FBProfilePictureView to display the profile picture of the person who made the post. It works just fine for pulling down and displaying the profile pic, except when scrolling. There is a very noticeable lag when scrolling before the pictureview displays the picture of the new user, where the view is showing the picture from the recycled cell.

s73v3r
  • 1,751
  • 2
  • 22
  • 48
  • Same problem. There is a bug report here: http://developers.facebook.com/bugs/487007427983915 Could do with a workaround though if anyone has any ideas? – djskinner Sep 22 '12 at 11:26
  • I would guess the workaround would be to not use their control, but to cache the profile picture yourself. – s73v3r Sep 22 '12 at 12:08

2 Answers2

5

If you set the profileID to nil before setting it to the new profileID string, the FBProfilePictureView will display the default Facebook profile picture while it fetches the intended one. This way, you at least won't still be displaying the image from the previous cell.

Note that setting the profileID to the empty string @"" will NOT have this same effect of displaying the default Facebook profile picture.

EDIT: I just updated to FB SDK 3.7 and the default profile picture is no longer shown as described above. Instead, when nil is given, it does not show any image at all.

Julian
  • 66
  • 1
  • 6
0

I implemented an improved facebook profile picture view that I am successfully using in UITableViewCells. I just committed it to github. If you decide to try it, I'd love to get feedback.

combinatorial
  • 9,132
  • 4
  • 40
  • 58