简体   繁体   English

IOS5 - [__ NSCFDictionary nombre]:无法识别的选择器发送到实例0x6da25a0

[英]IOS5 -[__NSCFDictionary nombre]: unrecognized selector sent to instance 0x6da25a0

I get an error when trying to access an attribute of a class "event" 尝试访问类“事件”的属性时出错

Json List all Ok When I trying to access the error jumps 杰森列出所有确定当我尝试访问错误跳转

Evento* bean = [ListaEventos objectAtIndex:indexPath.row];    
DetalleViewController *detalle = [self.storyboard    instantiateViewControllerWithIdentifier:@"Detalle"];
NSLog(@"detalle: %@",[bean nombre]);//bean Log OK!!, but bean.nombre Error!! why?

The class: evento.h 班级:evento.h

@interface Evento : NSObject

@property (strong, nonatomic)  NSString *idevento;
@property (strong, nonatomic)  NSString *nombre;
@property (strong, nonatomic)  NSString *descripcion;
@property (strong, nonatomic)  NSString *fecha;
@property (strong, nonatomic)  NSString *telefono;
@property (strong, nonatomic)  NSString *direccion;

@end

Evento.m Evento.m

@implementation Evento

@synthesize idevento;
@synthesize nombre;
@synthesize descripcion;
@synthesize fecha;
@synthesize telefono;
@synthesize direccion;

@end

What you get out of [ListaEventos objectAtIndex:indexPath.row]; 你从[ListaEventos objectAtIndex:indexPath.row]; is of kind NSDictionary and not of kind Evento as supposed. 是一种善良的NSDictionary而不是那种假设的Evento Check your data! 检查你的数据!

The object you get with 你得到的对象

[ListaEventos objectAtIndex:indexPath.row];

Is of type dictionary which doesn't have the method or the property nombre. 是类型字典,没有方法或属性nombre。 If you could add also add here the json we can help you to get the correct evento object. 如果可以添加,还可以在此处添加json,我们可以帮助您获取正确的evento对象。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 - [__ NSCFDictionary JSONRepresentation]:发送到实例的无法识别的选择器 - -[__NSCFDictionary JSONRepresentation]: unrecognized selector sent to instance - [__ NSCFDictionary rangeOfString:]:无法识别的选择器发送到实例 - -[__NSCFDictionary rangeOfString:]: unrecognized selector sent to instance 'NSInvalidArgumentException':无法识别的选择器发送到实例0x8d25aa0' - 'NSInvalidArgumentException': unrecognized selector sent to instance 0x8d25aa0' [__NSCFDictionary isEqualToString:]:无法识别的选择器发送到实例0x6b7e510' - [__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6b7e510' -[__ NSCFDictionary objectAtIndex:]:将JSON页解析为UITableView时,无法识别的选择器发送到实例0x8943940 - -[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x8943940 while parsing JSON Page to UITableView iOS,无法识别的选择器发送到实例? - iOS, unrecognized selector sent to instance? UIPickerView:无法识别的选择器发送到实例 - 仅在ios 3.1.x上 - UIPickerView: unrecognized selector sent to instance - only on ios 3.1.x iOS App崩溃-无法识别的选择器发送到实例 - IOS App crashes - unrecognized selector sent to instance 无法识别的选择器发送到实例defaultRepresentation iOS 8 - unrecognized selector sent to instance defaultRepresentation ios 8 无法识别的选择器发送到iOS7中的实例异常 - unrecognized selector sent to instance exception in iOS7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM