ios - CFNetwork internal error when load multiple images from local JSON file into tableview -
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"chatcell"; chatcell *cell = \[tableview dequeuereusablecellwithidentifier:@"mycell"\]; if (cell == nil) { \[tableview registernib:\[uinib nibwithnibname:cellidentifier bundle:nil\] forcellreuseidentifier:@"mycell"\]; cell = \[tableview dequeuereusablecellwithidentifier:@"mycell"\]; } chatdata *chatdata = \[self.loadedchatdata objectatindex:\[indexpath row\]\]; \[cell.images sd_setimagewithurl:\[nsurl urlwithstring:@"http://dev.apppartner.com/apppartnerprogrammertest/images/justin_avatar.png,http://dev.apppartner.com/apppartnerprogrammertest/images/drew_avatar.png"\]placeholderimage:\[uiimage imagenamed:@"placeholder"\]\]; \[cell loadwithdata:chatdata\]; return cell; }
why getting cfnetwork internal error when try load multiple images local json file tableview?
it because url
not found on server, mean url (http://dev.apppartner.com/apppartnerprogrammertest/images/justin_avatar.png,http://dev.apppartner.com/apppartnerprogrammertest/images/drew_avatar.png
) wrong. if open url in browser throws error 404
the requested url /apppartnerprogrammertest/images/justin_avatar.png,http://dev.apppartner.com/apppartnerprogrammertest/images/drew_avatar.png not found on server.
can try open url in browser. otherwise code seems alright. there no problem code think!!!
Comments
Post a Comment