For some methods, I want them to return a range of values โโ(from: 235 to: 245). I did this using NSRange as return value
- (NSRange)giveMeARangeForMyParameter:(NSString *)myParameter;
This works fine as long as the return value is an integer range (e.g. location: 235, length: 10).
But now I have a problem that I need to return a range of float (e.g. location: 500.5, length: 0.4). I read in doc that NSRange is a typed structure with NSUIntegers . Is it possible to type another structure for float ranges? And if so, could there be a similar NSMakeRange(NSUInteger loc, NSUInteger len) method for creating these float ranges?
source share