Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
282 views
in Technique[技术] by (71.8m points)

xcode7.3 - 'init(start:end:)' is deprecated: it will be removed in Swift 3. Use the '..<' operator

I'm using the following code:

var continousDigitsRange:Range<Int> = Range<Int>(start: 0, end: 0)

Since update to Xcode 7.3 (Swift 2.2) I got the following hint:

'init(start:end:)' is deprecated: it will be removed in Swift 3. Use the '..<' operator.

For me is not clear how to "translate" it correctly with "using the '..<' operator.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should simply write

var continousDigitsRange1:Range<Int> = 0..<0

or if you want to go even simpler

var continousDigitsRange = 0..<0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...