Skip to content

Instantly share code, notes, and snippets.

@juliofruta
Last active April 25, 2018 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliofruta/56bd6b30b40aa6595d8fa8c73db37c54 to your computer and use it in GitHub Desktop.
Save juliofruta/56bd6b30b40aa6595d8fa8c73db37c54 to your computer and use it in GitHub Desktop.
bitso challenge on facebook
let currentCollation = UILocalizedIndexedCollation.current().sectionTitles
for i in currentCollation.enumerated() {
if i.element == "G" {
print(i.offset + 1, i.element)
}
if i.element == "N" {
print(i.offset + 1, i.element)
}
if i.element == "T" {
print(i.offset + 1, i.element)
}
}
@juliofruta
Copy link
Author

Output:
7 G
14 N
20 T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment