我有 2 个文件,data.h 和 data.m,带有连接 db 和方法 db。当我实现一个方法时,我有一个警告
*不兼容的指针类型将'NSString *'发送到'NSInteger *'(又名'int ')类型的参数这是我的代码。
在数据.h
- (id)initCity:(NSString *)pathDB: (NSInteger *)id_city: (NSString *)type;
- (void)getCity:(NSString *)dbPath:(NSInteger *)id_city;
在数据.m
- (id)initCity:(NSString *)pathDB: (NSInteger *)id_city: (NSString *)type
{
[self getCity:pathDB: id_city: type];
return self;
}
- (void)getCity:(NSString *)dbPath : (NSInteger *)id_city : (NSString *)type { .......
......
}
我在哪里调用我的方法
NSString *mystring = @"string";
dataCity = [[Data alloc] initCity: defaultDBPath: selectedItem :mystring];
NSMutableDictionary *dictionary = [dataCity objectAtIndex:0];
哪里错了?谢谢坦率