Returns a data object containing the receiver’s bytes that fall within the limits specified by a given range.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
The range in the receiver from which to get the data. The range must not exceed the bounds of the receiver.
A data object containing the receiver’s bytes that fall within the limits specified by
range isn’t within the receiver’s range of bytes, raises
A sample using this method can be found in Working With Binary Data.