2011-02-24 248 views
0

我已经按照从 passing data between classes串到另一个视图

做了教程,并且工作正常,但我真的需要发送一些字符串值(日期),另一种意见认为,(很简单,但我知道IM对于这个小白!),

  • ,所以我的问题是,我需要发送此字符串(日期),以另一种观点认为,该字符串是好的,但我不似乎得到(还)如何构造函数,

我没有得到任何警告,但应用BRE AKS,

- (void)calendarView:(KLCalendarView *)calendarView tappedTile:(KLTile *)aTile{ 
NSLog(@"Date Selected is %@",[aTile date]); 

string1 = [[aTile date] description]; 
dateis.text = string1; //label to check string is working 

NSLog(@"ahi va! %@", string1); 

NSString *cucux = dateis.text; 

CroTime *croco = [CroTime alloc]; 
croco.string1 = cucux; 
[self.view addSubview:croco.view]; 

NSLog(@"croco = %@", cucux); 

} 

控制台消息

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CroTime setString1:]: unrecognized selector sent to instance 0x5e2e1e0' 

非常感谢!

回答

1

setString1是当你设定从你的错误属性value.So这看起来像您在类CroTime属性字符串1,但你没有合成它它调用setter方法。

这种情况只发生在这种情况下。所以请确保在制作属性时将其合成到.m文件中。

+0

+1我认为@ishu在他的结尾是正确的......这种类型的错误信息是在ishu上面讨论的条件中。 – Sudhanshu 2011-02-24 05:36:44

+0

非常感谢!!,就是这样!,我在学习很多!,需要知道如何识别这个connsole消息......干杯 – MaKo 2011-02-24 05:41:30

相关问题