For some methods I want them to return a range of values (from: 235, to: 245). I did this using NSRange
as a 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 the problem that I need to return a float
range (e.g. location: 500.5, length: 0.4). I read in the doc that NSRange
is a typedefed struct with NSUIntegers
. Is it possible to typedef another struct for float
ranges? And if so, can there be a similar method to NSMakeRange(NSUInteger loc, NSUInteger len)
to create those float
ranges?