У меня есть больше, чем представление таблицы в контроллере представления, оно дает ошибку. Я понятия не имею, что там происходит, может ли кто-нибудь руководствоваться. Данные не отображаются в табличном представлении, но массив имеет данные при печати на консоли, я пробовал без массива, также предоставляю статические данные в cell.textLabel.text, но не отображается в tableview, количество строк не проверяет там никаких проблем. элемент управления не переходит в cell.textLabel.text, я не понимаю, что не так. Пожалуйста, руководство для вышесказанного. Ниже приведен код:Ошибка [IRForTarget] в UITableView
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell;
if(tableView == self.mLocationTable)
{
cell = [self.mLocationTable dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
else{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
// if([self.mLocShowArr count]!= 0)
// {
// NSString *str = [self.mLocShowArr objectAtIndex:indexPath.row];
cell.textLabel.text = @"locations";
// NSLog(@"show loc:%@", [self.mLocShowArr objectAtIndex:0]);
// }
}
if(tableView == self.mNotifyTable)
{
cell = [self.mNotifyTable dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
UIImage *yourImage = [UIImage imageNamed:@"emma-watson-02.jpg"];
UIImageView *imageViewToPutInCell = [[UIImageView alloc] initWithImage:yourImage];
imageViewToPutInCell.frame = CGRectMake(5, 8, 55, 55);
UILabel *cellTextLabel = [[UILabel alloc]initWithFrame:CGRectMake(68, 10, 200, 40)];
cellTextLabel.text = @"notification view";
[cell addSubview:imageViewToPutInCell];
[cell addSubview:cellTextLabel];
}
}
Это полная ошибка: Error [IRForTarget]: Вызов символа только функции «objc_msgSend», который не присутствует в мишени.
Нет, я не пропустил это. – 2013-04-01 07:54:52