【发布时间】:2011-10-26 06:13:27
【问题描述】:
我想从我的选择器方法中传递一个int 值,但选择器方法只接受一个对象类型参数。
int y =0;
[self performselector:@selector(tabledata:) withObject:y afterDelay:0.1];
方法执行到这里
-(int)tabledata:(int)cellnumber {
NSLog(@"cellnumber: %@",cellnumber);
idLabel.text = [NSString stringWithFormat:@"Order Id: %@",[[records objectAtIndex:cellnumber] objectAtIndex:0]];
}
但我的方法中没有得到精确的整数值,我只得到了 id 值。
【问题讨论】:
标签: objective-c ios type-conversion selector