Parse.com ajout d'images via une URL

Je voulais juste requestr comment append à mon Parse TableView via URl quelques images. Je suis coincé avec ça. Je l'ai fait avec des cellules personnalisées. Les labels fonctionnent bien.Pouvez-vous m'aider s'il vous plaît avec l'ajout d'imageview? Merci Milan

TableViewController.h > #import <UIKit/UIKit.h> > #import "Parse/Parse.h" > #import "CustomCell.h" > > @interface TableViewController : UITableViewController > <UITableViewDelegate,UISearchDisplayDelegate, UISearchBarDelegate> { > > NSArray *colorsArray; > NSArray *searchResults; > } > > @property (strong, nonatomic) IBOutlet UITableView *colorsTable; > > > > @end 

TableViewController.m

  @interface TableViewController () @end @implementation TableViewController @synthesize colorsTable; - (void) resortingeveFromParse { PFQuery *resortingeveColors = [PFQuery queryWithClassName:@"Hracky1"]; [resortingeveColors findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { colorsArray = [[NSArray alloc] initWithArray:objects]; } [colorsTable reloadData]; }]; [self.colorsTable reloadData]; [self.refreshControl endRefreshing]; } - (id)initWithStyle:(UITableViewStyle)style { self = [super initWithStyle:style]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; [self performSelector:@selector(resortingeveFromParse)]; UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; self.refreshControl = refreshControl; [refreshControl addTarget:self action:@selector(resortingeveFromParse) forControlEvents:UIControlEventValueChanged]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section. return colorsArray.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSSsortingng *CellIdentifier = @"colorsCell"; CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; PFObject *tempObject = [colorsArray objectAtIndex:indexPath.row]; [cell.imageview setFile: [tempObject objectForKey:@"ImageURL"]]; [cell.imageview loadInBackground]; cell.cellTitle.text = [tempObject objectForKey:@"cellTitle"]; cell.cellDescript.text = [tempObject objectForKey:@"cellDescript"]; return cell; } @end 

CustomCell.h

 #import <UIKit/UIKit.h> #import "Parse/Parse.h" @interface CustomCell : UITableViewCell @property (strong, nonatomic) IBOutlet UILabel *cellTitle; @property (strong, nonatomic) IBOutlet UILabel *cellDescript; @property (strong, nonatomic) IBOutlet PFImageView *imageview; @end 

CustomCell.m

 #import "CustomCell.h" @implementation CustomCell @synthesize cellTitle; @synthesize cellDescript; @synthesize imageview; - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSSsortingng *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { // Initialization code } return self; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end 

PFImageView utilisant PFImageView pour afficher un file image (PFile). Changez votre UIImageView en PFImageVIew
Si vous avez xib file xib , changez votre class.
entrez la description de l'image ici

  @property (strong, nonatomic) IBOutlet PFImageView *imageview; 

Dans cellForRow :

  [cell.imageview setFile: [tempObject objectForKey:@"ImageURL"]]; [cell.imageview loadInBackground]; 

Si quelqu'un a le même problème. Je l'ai déjà corrigé avec With SDWebImage.