1 NSInteger 转成NSString
//currentIndex 的类型是NSInteger类型
NSString *currentIndex = [NSString stringWithFormat:@"%ld", (long)self.currentSelectedIndex];
2.NSString转成NSInteger
//currentIndex字符串
self.currentSelectedIndex = [currentIndex integerValue];
1 NSInteger 转成NSString
//currentIndex 的类型是NSInteger类型
NSString *currentIndex = [NSString stringWithFormat:@"%ld", (long)self.currentSelectedIndex];
2.NSString转成NSInteger
//currentIndex字符串
self.currentSelectedIndex = [currentIndex integerValue];