У меня есть обычай PFTableViewCell
с использованием NIB. Все мои пользовательские ярлыки отображаются, но мой PFImageView
нет. Я изменил все на UIImageView
, чтобы убедиться, что это не что-то не так с моим вызовом Parse, но я не мог заставить его работать даже при установке статического изображения в моих ресурсах.Пользовательская ячейка не отображает PFImageView?
В ячейке моей ячейки указан foodCell
, а foodcell.h устанавливается как владелец.
Вот скриншот, показывающий ImageView на мой NIB
Вот мой foodCell.h, чтобы показать выход из PFImageView
:
#import <Parse/Parse.h>
@interface foodCell : PFTableViewCell
@property (weak, nonatomic) IBOutlet NSObject *foodCell;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *foodDescription;
@property (weak, nonatomic) IBOutlet UILabel *foodTitle;
@property (strong, nonatomic) IBOutlet PFImageView *foodPic;
@end
Теперь вот где я могу настроить камеру. Опять же, все мои другого кода здесь работает, кроме foodCell.foodPic.file
:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object {
static NSString *CellIdentifier = @"foodCell";
foodCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if (cell == nil) {
cell = [[foodCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
cell.foodPic.file = [object objectForKey:@"foodImage"];
cell.foodTitle.text = [object objectForKey:@"foodName"];
cell.foodDescription.text = [object objectForKey:@"foodDescription"];
NSString *myString = [@"$" stringByAppendingString:[NSString stringWithFormat:@"%[email protected]", [object objectForKey:@"foodPrice"]]];
cell.priceLabel.text = myString;
return cell;
}