I Bild zu zeigen, haben in imageView
SDWebImage
mitBild hochladen in Imageview innerhalb Kollektion mit sdwebimage
Hier ist mein Code:
NSString *string2 = [[dataArray objectAtIndex:indexPath.row ]valueForKey:@"logo"];
[imagev sd_setImageWithURL:[NSURL URLWithString:@"http://dev-demo.info.bh-in-15.webhostbox.net/dv/nationalblack/upload/post/"]
placeholderImage:[UIImage imageNamed:string2]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
imagev.image = image;
}];
Ich bin kein Bild innerhalb ImageView
bekommen
Daten, die ich vom Server bekomme, ist
data array (
{
address = brisbane;
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = delhi;
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464935578;
email = "[email protected]";
expirydays = 366;
expirymail = 0;
"fb_address" = "";
id = 78;
"inst_address" = "";
isexpired = 0;
isfeatured = 0;
lat = "-33.7961";
"link_address" = "";
lng = "151.146";
logo = "";
longdesc = "xyz ";
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 13;
"pt_address" = "";
sevendaysmail = 0;
shortdesc = hello123;
state = "New South Wales";
status = 1;
tags = "";
"tb_address" = "";
title = aayush;
transcationid1 = "";
"tw_address" = "";
userid = 5;
username = "Gautam Kumar";
"var_name" = 56;
"web_address" = "";
},
{
address = "Address 1";
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = ABD;
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464158696;
email = "[email protected]";
expirydays = 357;
expirymail = 0;
"fb_address" = "";
id = 75;
"inst_address" = "";
isexpired = 0;
isfeatured = 0;
lat = "-37.488";
"link_address" = "";
lng = "144.592";
logo = "appflowchart_4c1.gif";
longdesc = "This is short Description.";
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = "";
sevendaysmail = 0;
shortdesc = "This is short Description.";
state = Gisborne;
status = 1;
tags = "";
"tb_address" = "";
title = Business1;
transcationid1 = "";
"tw_address" = "";
userid = 5;
username = "Gautam Kumar";
"var_name" = 0;
"web_address" = "";
},
{
address = "Paschim Vihar ,Delhi";
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = "New Delhi";
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464065014;
email = "[email protected]";
expirydays = 356;
expirymail = 0;
"fb_address" = Facebook;
id = 72;
"inst_address" = Instagram;
isexpired = 0;
isfeatured = 0;
lat = "-37.488";
"link_address" = linked;
lng = "144.592";
logo = "Screenshot_(1)_61b.png";
longdesc = sdfsdfdsf;
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = Pinsta;
sevendaysmail = 0;
shortdesc = fffsdf;
state = Gisborne;
status = 1;
tags = "";
"tb_address" = Tumbler;
title = "First business";
transcationid1 = "";
"tw_address" = Twitter;
userid = 5;
username = "Gautam Kumar";
"var_name" = 2;
"web_address" = Website;
},
{
address = Laxminagar;
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = "New Delhi1";
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1463651418;
email = "[email protected]";
expirydays = 7;
expirymail = 0;
"fb_address" = Facebook;
id = 61;
"inst_address" = Instagram;
isexpired = 0;
isfeatured = 0;
lat = "28.6433";
"link_address" = linked;
lng = "77.0363";
logo = "Screenshot_(1)_0ba.png";
longdesc = asxasxasx;
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = Pinsta;
sevendaysmail = 0;
shortdesc = xasxasx;
state = Victoria;
status = 1;
tags = "";
"tb_address" = Tumbler;
title = "Testing by Gautam";
transcationid1 = 1111111111111;
"tw_address" = Twitter;
userid = 5;
username = "Gautam Kumar";
"var_name" = 2;
"web_address" = Website;
}
)
Was ist Ihr Entwicklungsziel ??? –
Ich denke, Sie brauchen einen vollständigen Pfad zu Ihrem Image im Server nicht nur Screenshot_ (1) _61b.png und Ihre NSURL sollte aussehen wie [NSURL URLWithString: @ "http: //dev-demo.info.bh-in -15.webhostbox.net/dv/nationalblack/upload/post/Screenshot_(1)_0ba.png "]' – iSashok
aber es gibt nicht nur ein Bild, es gibt verschiedene Bilder, so dass jede Zelle ein anderes Bild zeigt @iSashok –