У меня есть массив данных.И мои данные не отображаются на экране.Не уверен, что мне не хватает.
@property NSMutableArray *NotifTotal;
@interface HomeVC ()<UITableViewDelegate, UITableViewDataSource>
@end
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.NotifTotal count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:
(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"FilterTableViewCell";
FilterTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
NSDictionary *dict;
dict = [self.NotifTotal objectAtIndex:indexPath.row];
NSLog(@"%@", dict); // data is coming.
NSString* salt = [dict objectForKey:@"salt"];
NSString* name = [dict objectForKey:@"Name"];
NSLog(@"%@%@", name,swerk); // in console i can print the data
cell.sLabel.text = [NSString stringWithFormat: @"%@", salt];
cell.nLabel.text = [NSString stringWithFormat: @"%@", name];
return cell;
}
Почему мои данные не отображаются на моем экране. Я добавил делегата, источник данных также на моем экране. Любое решение?