title: Stuck: Analog Clock in Swift iOS
body: <p>I'm new to swift (and coding in general), and I've been working on an analog watch project. I've gotten to a place where I'm stuck. None of the println() commands are putting anything out to the console unless they arrive before the function "func setTime(){...} ". Not sure what's happening there. And I can't seem to get the hands to rotate with the math I found <a href="https://stackoverflow.com/questions/7092513/24-hour-analog-clock">here</a>. I'm trying to convert it from obj-c to swift. (I know the bottom section is very wrong at the moment) I keep messing with it (the bottom section) but I don't get any rotation.</p>
  
  <p>Any help would be appreciated. I feel like I'm close.</p>
  
  <pre><code>    var theTimer:NSTimer!
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
      println(viewDidLoad)
  
      func setTime(){
  
          println("set time")
  
          self.theTimer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: "set time", userInfo: nil, repeats: false)
  
          let date = NSDate()
          let outputFormatter = NSDateFormatter()
          outputFormatter.dateFormat = "hh:mm:ss"
          let newDateString:NSString = outputFormatter.stringFromDate(date)
          println(newDateString)
  
          let calendar = NSCalendar.currentCalendar()
          let components = calendar.components(.CalendarUnitHour | .CalendarUnitMinute | .CalendarUnitSecond, fromDate: date)
          var hour = components.hour
          var minute = components.minute
          var second = components.second
  
          println(hour)
          println(minute)
          println(second)
  
          **var secAngle = (6 * second)
          var minAngle = (6 * minute)
          var hourAngle = (30 * hour + minute / 2)
  
          self.secsImage.transform = CGAffineTransformMakeRotation( CGFloat(secAngle) )
          self.minsImage.transform = CGAffineTransformMakeRotation( CGFloat(Double(minAngle)) )
          self.hoursImage.transform = CGAffineTransformMakeRotation( CGFloat(Double(hourAngle)) )**
  
          println(secAngle)
          println(minAngle)
          println(hourAngle)
  }
  }
  </code></pre>