Я новичок в ObjectiveC, и работа над customTableView все шло хорошо, пока я не запустил приложение, и содержимое не отображается, кроме таблицы blanc с линиями по ней. Я попытался найти решение проблемы но до сих пор не повезло ниже не код, а также фотографии прилагаетсяCustomTableView not Отображение содержимого
Любая помощь с этим будет очень цениться
#import "ContactsTableViewController.h"
#import "CustomCell.h"
@interface ContactsTableViewController()
@property (nonatomic, strong) NSArray *ContactsArray;
@property (nonatomic, strong) NSDictionary *Contact;
@end
@implementation ContactsTableViewController
@synthesize ContactsArray, Contact;
- (id) initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self)
{
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle]pathForResource:@"Contacts" ofType:@"plist"];
ContactsArray = [NSArray arrayWithContentsOfFile:path];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [ContactsArray count];
}
- (UITableViewCell *)tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath
{
static NSString *CellIdentifier = @"Cell";
CustomCell *customCell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier forIndexPath: indexPath];
ContactsArray = ContactsArray [indexPath.row];
NSString *firstName = Contact[@"firstName"];
NSString *lastName = Contact[@"lastName"];
NSString *imageName = Contact[@"imageName"];
UIImage *image = [UIImage imageNamed:imageName];
customCell.CustomFirstNameLabel.text = firstName;
customCell.CustomLastNameLabel.text= lastName;
customCell.CustomImageView.image = image;
return customCell;
{
любезно согласиться с ответом, который, по вашему мнению, помог вам больше всего! –
Спасибо за информацию, которую мне только что удалось заставить работать. Cesar – Cesar