无法从应用程序通知小组件中的图像URL加载图像

时间:2016-08-30 05:53:36

标签: ios notifications widget

我正在尝试在App Notification Widget内的集合视图中显示图像列表。 它给我错误“无法加载”如果我从网址加载,除了它的工作正常。 有人可以帮我吗?

TodaysCusCell *catTrendingCusCell = (TodaysCusCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"TodaysCusCellID" forIndexPath:indexPath];
NSDictionary *trendingDic = (NSDictionary *)[trendingArr objectAtIndex:indexPath.row];

//Loading Images
NSString *imageURL = [trendingDic objectForKey:@"image_url"];
[catTrendingCusCell.trendingImgView sd_setImageWithURL:[NSURL URLWithString:imageURL] placeholderImage:[UIImage imageNamed:@"grayBackground"]];

0 个答案:

没有答案