Christmas Xcode Theme 🎅🏻

The holidays are coming, the house is decorated, gifts are bought, cheerful lights are scattered all around the world, happy warm music is playing…

christmas-fire

…but we all know that we can’t stay away from Xcode even during this time! Why not bring a bit of the Christmas Spirit to Xcode then? ⛄

Introducing…the Christmas Xcode Theme! 🎄

christmas-xcode-theme

Download it here

🎁 A gift to all of you, Happy Swiftly Holidays! 🎁

Code Snippet

If you're interested in the Twelve Days of Christmas song code, here it is:

let gifts = [ "partridge in a pear tree", "Two turtle doves",       "Three French hens",
              "Four calling birds",       "Five golden rings",      "Six geese a-laying",
              "Seven swans a-swimming",   "Eight maids a-milking",  "Nine ladies dancing",
              "Ten lords a-leaping",      "Eleven pipers piping",   "Twelve drummers drumming" ]

let nth = [ "first",   "second", "third", "fourth", "fifth",    "sixth",
            "seventh", "eighth", "ninth", "tenth",  "eleventh", "twelfth" ]

func gifts(for day: Int) -> String {
  var result = "On the \(nth[day-1]) day of Christmas, my true love sent to me:\n"
  if day > 1 {
    for again in 1..<day {            //              .
      let n = day - again             //           __/ \__
      result += gifts[n]              //           \     /          /  /
      if n > 1 { result += "," }      //           /.'o'.\         /| /|   _  _   _
      result += "\n"                  //            .o.'.         / |/ |  (/_/ (_/ (_(_/
    }                                 //           .'.'o'.     `-'     `-'  ,-        /
    result += "And a "                //          o'.o.'.o.               _/,'  /)           _/_
  } else {                            //         .'.o.'.'.o.              /    /_  _   . _   / _ _   __  _
    result += "A "                    //        .o.'.o.'.o.'.             (   / (_/ (_(_/ )_(_/ / /_(_(_/_)
  }                                   //           [_____]                 `-'
  return result + gifts[0] + ".\n"    //            \___/
}

for day in 1...12 {
  print(gifts(for: day))
}
⭑⭑⭑⭑⭑