0
我有一個CPImage:如何使用CPImage從URL下載圖像?
-(void)setAvatarImageForMessage:(STMessage)aSTMsg{
var image = [[CPImage alloc] initWithContentsOfFile:aSTMsg.avatar_url];
[image setDelegate:self];
if([image loadStatus] == CPImageLoadStatusCompleted)
CPLog.debug("avatar image loaded");
else
CPLog.debug("avatar image FAILED!!!");
}
,但我不知道這是從一個URL下載圖像的正確方法是什麼?
如何註冊圖像已加載的通知? – 2010-12-07 22:42:32