title: How do I change the text color in Swift?
body: <p>I found the indicator function on Stackoverflow. I like it too, but I couldn't change the text color, actually, I change the code that is blackColor() but it doesn't work. How do I fix it? I want to see text and indicator are black.</p>
  
  <pre><code>class ProgressHUD: UIVisualEffectView {
  
      var text: String? {
          didSet {
              label.text = text
          }
      }
      let activityIndictor: UIActivityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.White)
      let label: UILabel = UILabel()
      let blurEffect = UIBlurEffect(style: .Light)
      let vibrancyView: UIVisualEffectView
  
      init(text: String) {
          self.text = text
          self.vibrancyView = UIVisualEffectView(effect: UIVibrancyEffect(forBlurEffect: blurEffect))
          super.init(effect: blurEffect)
          self.setup()
      }
  
      required init(coder aDecoder: NSCoder) {
          self.text = ""
          self.vibrancyView = UIVisualEffectView(effect: UIVibrancyEffect(forBlurEffect: blurEffect))
          super.init(coder: aDecoder)!
          self.setup()
  
      }
  
      func setup() {
          contentView.addSubview(vibrancyView)
          vibrancyView.contentView.addSubview(activityIndictor)
          vibrancyView.contentView.addSubview(label)
          activityIndictor.startAnimating()
      }
  
      override func didMoveToSuperview() {
          super.didMoveToSuperview()
  
          if let superview = self.superview {
  
              let width = superview.frame.size.width
              let height = superview.frame.size.height
              self.frame = CGRectMake(superview.frame.size.width / 2 - width / 2,
                  superview.frame.height / 2 - height / 2,
                  width,
                  height)
              vibrancyView.frame = self.bounds
  
              let activityIndicatorSize: CGFloat = 50
              activityIndictor.frame = CGRectMake(5, height / 2 - activityIndicatorSize / 2,
                  activityIndicatorSize,
                  activityIndicatorSize)
  
              layer.cornerRadius = 8.0
              layer.masksToBounds = true
              label.text = text
              label.textAlignment = NSTextAlignment.Center
              label.frame = CGRectMake(activityIndicatorSize + 5, 0, width - activityIndicatorSize - 15, height)
              label.textColor = UIColor.blackColor() //I changed here grayColor() to blackColor but it doesn't work!
              label.font = UIFont.boldSystemFontOfSize(16)
          }
      }
  
      func show() {
          self.hidden = false
      }
  
      func hide() {
          self.hidden = true
      }
  }
  </code></pre>