title: Loop through subview to check for empty UITextField - Swift
body: <p>I"m wondering how to essentially transform the objective c code below into swift.</p>
  
  <p>This will loop through all the subviews on my desired view, check if they are textfields, and then check if they are empty of not. </p>
  
  <pre><code>for (UIView *view in contentVw.subviews) {
      NSLog(@"%@", view);
      if ([view isKindOfClass:[UITextField class]]) {
          UITextField *textfield = (UITextField *)view;
          if (([textfield.text isEqualToString:""])) {
              //show error
              return;
          }
      }
  }
  </code></pre>
  
  <p>Here is where i am with swift translation so far:</p>
  
  <pre><code>for view in self.view.subviews as [UIView] {
      if view.isKindOfClass(UITextField) {
          //...
  
      }
  }
  </code></pre>
  
  <p>Any help would be great!</p>