【发布时间】:2013-07-31 08:04:00
【问题描述】:
我正在使用 XMPPFramework 为 iPhone 创建一个聊天应用程序。我想用用户名和照片在 UITableView 中显示用户列表,为此我正在使用
NSData *photoData = [[[self appDelegate] xmppvCardAvatarModule] photoDataForJID:user.jid];
if (photoData != nil)
cell.imageView.image = [UIImage imageWithData:photoData];
else
cell.imageView.image = [UIImage imageNamed:@"blank_image~iPhone.png"];
但它总是返回 nil。
请帮忙..
【问题讨论】:
-
什么返回 nil ?照片数据?
-
if (photoData) cell.imageView.image = [UIImage imageWithData:photoData];
标签: iphone ios objective-c xmppframework