Daily Archives: 2012 年 06 月 20 日

Hello World

missing sentinel in method dispatch

objective-c怪异的语法,下面数组的写法,第一个会报错,第二个就ok

NSArray *signs1;
    signs1 = [NSArray arrayWithObjects:@"+",@"÷",@"×",@"-"];
 
NSArray *signs2;
    signs2 = [NSArray arrayWithObjects:@"+",@"÷",@"×",@"-",nil];

查了一下教程,使用arrayWithObjects方法为数组添加数据,nil代表结束,另外,这也是数组中不能传出nil的原因 :???: :???: