这似乎是一个非常愚蠢的问题,但我不明白为什么我会出错。
我有一个实例变量声明为:
NSInteger *scopeSelected;我使用这个变量来跟踪UISearchDisplay控制器中选择的作用域,使用:
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller
shouldReloadTableForSearchScope:(NSInteger)searchOption {
scopeSelected=searchOption;
return YES;
}然而,我总是在任务分配行中被抛出这个警告:
赋值使指针在没有强制转换的情况下从整数生成
有人能告诉我我的密码出了什么问题吗?这不只是NSInteger到NSInteger的任务吗?
发布于 2010-08-12 16:53:38
NSInteger是一个int
改变:
NSInteger *scopeSelected;至:
NSInteger scopeSelected;https://stackoverflow.com/questions/3470041
复制相似问题