title: Is there a way of styling UITableViewCell in swift?
body: <p>I have a table view and I am adding several cells to it based on my json. </p>
  
  <p>So far the code for adding cells looks as follows:</p>
  
  <pre><code>override func viewWillAppear(animated: Bool) {
      let frame:CGRect = CGRect(x: 0, y: 90, width: self.view.frame.width, height: self.view.frame.height-90)
      self.tableView = UITableView(frame: frame)
      self.tableView?.dataSource = self
      self.tableView?.delegate = self
      self.view.addSubview(self.tableView!)
  
  }
  
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return self.items.count;
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      var cell = tableView.dequeueReusableCellWithIdentifier("CELL")
  
      if cell == nil {
          cell = UITableViewCell(style: UITableViewCellStyle.Value1, reuseIdentifier: "CELL")
      }
  
      let user:JSON =  JSON(self.items[indexPath.row])
  
      cell!.textLabel?.text = user["description"].string
  
      var photoURL =  "/path/to/my/icon/google.png"
  
      if let data = NSData(contentsOfFile: photoURL)
      {
  
          cell!.imageView?.image = UIImage(data: data)
      }
      return cell!
  }
  </code></pre>
  
  <p>Besides the <code>description</code> in my json I have also <code>username</code> and <code>price</code>. So far - since I'm adding only <code>imageView</code> and <code>description</code>, 3 cells look like this:</p>
  
  <p><a href="https://i.stack.imgur.com/NKF1h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NKF1h.png" alt="enter image description here"></a></p>
  
  <p>Is there a way to style it so that each cell looks similar to this:</p>
  
  <p><a href="https://i.stack.imgur.com/U64qu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U64qu.png" alt="enter image description here"></a></p>
  
  <p>(<code>price</code> and <code>username</code> are grey here`)? How can I achieve this effect?</p>
  
  <p>===EDIT:</p>
  
  <p>this is how I populate my table:</p>
  
  <p>I'm fetching data from rest webservice to json:</p>
  
  <pre><code>func getAllUsers() {
      RestApiManager.sharedInstance.getUsers { json in
          let results = json
          for (index: String, subJson: JSON) in results {
              let user: AnyObject = JSON.object
              self.items.addObject(user)
              dispatch_async(dispatch_get_main_queue(),{
                  self.tableView?.reloadData()
              })
          }
      }
  }
  </code></pre>
  
  <p>and I invoke this method in my <code>viewWillAppear</code> function</p>