Initializer
init(repeating:count:)
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
Initialize a
Data with a repeating byte patterninit(repeating repeatedValue: UInt8, count: Int)
Parameters
repeatedValueA byte to initialize the pattern
countThe number of bytes the data initially contains initialized to the repeatedValue