Obecnie Używam XCode 8 i na linii'advancedBy' jest niedostępny w Xcode 8
let range = key.startIndex...key.startIndex.advancedBy(0)
pojawia się błąd:
error: 'advancedBy' is unavailable: To advance an index by n steps call 'index(_:offsetBy:)' on the CharacterView instance that produced the index.
Jak mogę rozwiązać ten problem?
zrzut ekranu z błędem jest poniżej:
Proszę podać swój kod w pytaniu, a także zrzut ekranu. – Paulw11
Należy użyć index offsetBy http://stackoverflow.com/a/38215613/2303865 –
Zobacz https://github.com/apple/swift-evolution/blob/master/proposals/0065-collections-move-indices. md – HAS