वर्तमान में उपलब्ध नहीं है, मैं लाइन'advancedBy' Xcode 8
let range = key.startIndex...key.startIndex.advancedBy(0)
पर XCode 8 का उपयोग किया गया है और मैं त्रुटि मिलती है:
error: 'advancedBy' is unavailable: To advance an index by n steps call 'index(_:offsetBy:)' on the CharacterView instance that produced the index.
मैं इसे कैसे ठीक कर सकते हैं?
त्रुटि का स्क्रीनशॉट नीचे है:
प्रश्न में अपने कोड के साथ-साथ स्क्रीनशॉट शामिल करें। – Paulw11
आपको इंडेक्स ऑफसेट का उपयोग करने की आवश्यकता है http://stackoverflow.com/a/38215613/2303865 –
https://github.com/apple/swift-evolution/blob/master/proposals/0065-collections-move-indices देखें। md – HAS