I know it could be a duplicate, but i got about 30 Implicit conversion loses Integer precision warnings in my ios project after updating xcode to version 6.
First Example:
NSArray * stations = [self stationsJSON][KEY_ITEM_LIST];
int newSize = (stations.count + 1); // Implicit conversion loses Integer precision: 'unsigned long' to 'int'
Second Example:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
...
int index = indexPath.row / 2; // Implicit conversion loses Integer precision: 'long' to 'int'
...
}
I know what the warning means. Using NSInteger can help to avoid this warning.
I don't understand, why there was no warnings in xcode 5? And why there is no warning after i change the line
int index = indexPath.row / 2;
to
int index = indexPath.row / 2i;