【发布时间】:2011-10-31 11:14:07
【问题描述】:
我正在使用 XMPP 开发一个 iphone 应用程序。
我正在尝试打印聊天室中已登录用户的图像。这是我的代码。
XMPPvCardAvatarModule *avatar = [[XMPPvCardAvatarModule alloc]initWithvCardTempModule:[[self appDelegate]xmppvCardTempModule]];
XMPPJID *jidUser = [XMPPJID jidWithString:key];
NSData *foto = [[NSData alloc]initWithData:[avatar photoDataForJID:jidUser]];UIImage *pic = [UIImage imageWithData:fotoData];
UIImageView *picVista = [[UIImageView alloc] initWithImage:pic];
[self.commentsGente addSubview:picVista];
但是 NSData 总是 0KB,所以显然没有图像。如何做到这一点?
【问题讨论】:
-
嘿兄弟,我需要你的 v-card 帮助。你能告诉我如何实现或保存卡片以及如何检索它。
标签: iphone objective-c xmpp