Я создаю приложение, в котором я визуализацию моих зарегистрированных пользователей к моему databrowser из Parse.com (в контроллере TableView) и ступенчатые данные выбранной ячейки в новый контроллер представления ..данные Попутных изображений
Моей проблема что я не могу просматривать изображения в новом контроллере представления, вы можете сказать мне, как я могу это сделать? Я пытаюсь понять и исследовать argormento на различных форумах, но не могу найти ответы на форуме, и Parse долгое время с тех пор, как меня оставили без ответов.
Это код, я работаю над:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{ if ([segue.identifier isEqualToString:@"Visual"]){
NSIndexPath *indexPath = [self.Tork indexPathForSelectedRow];
PFObject *object = [self.objects objectAtIndex:indexPath.row];
ViewController *detailViewController = [segue destinationViewController];
detailViewController.oggetto = object; } }
TableView:
- (PFQuery *)queryForTable {
PFQuery *query = [PFQuery queryWithClassName:@"_User"];
[query whereKeyExists:@"username"];
[query whereKeyExists:@"picture"];
[query whereKeyExists:@"email"];
// If no objects are loaded in memory, we look to the cache first to fill the table
// and then subsequently do a query against the network.
if ([self.objects count] == 0) {
query.cachePolicy = kPFCachePolicyCacheThenNetwork; }
[query orderByAscending:@"username"];
return query; }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
// Configure the cell
cell.textLabel.text = [object objectForKey:@"username"];
cell.detailTextLabel.text = [object objectForKey:@"email"]];
cell.imageView.image = [UIImage imageNamed:@"none.png"];
PFFile *file = [object objectForKey:@"picture"];
[file getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
cell.imageView.image =[UIImage imageWithData:data];
}];
return cell;
}