title: swift xcode error: "instance member 'name' cannot be used on type 'clothing_category'
body: <p>I am currently building an ios app using swift on xcode and I keep getting the error <code>instance member 'name' cannot be used on type 'clothing_category.'</code> </p>
  
  <p>I have set up a tableviewcell and I need to fetch the appropriate <code>clothig_category</code> in the clothing_categories array. The line that has the error is:  <code>cell.nameclothing_category.text = clothing_category.name</code></p>
  
  <p>Below is the full code: </p>
  
  <pre><code>class clothing_category: NSObject {
      let name: String!
      init (name: String) {
         self.name = name
      }
  }
  
  class categoryTableViewController: UITableViewController {
  
  // MARK: Properties 
  
      // Create an array to hold the clothing.
      var clothing_categories = [clothing_category]()
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Load sample data
          loadSampleClothing_categories()
      }
          func loadSampleClothing_categories() {
              clothing_categories.append(clothing_category(name:"Jackets"))
              clothing_categories.append(clothing_category(name: "Accessories"))
              clothing_categories.append(clothing_category(name: "Pants"))
              clothing_categories.append(clothing_category(name: "Color"))
              clothing_categories.append(clothing_category(name: "Tops"))
              clothing_categories.append(clothing_category(name: "Dressing for an Occaision"))
  
  
  
          // Load up the array when the view is loaded.
  
          clothing_categories.append(clothing_category(name:"Jackets"))
          clothing_categories.append(clothing_category(name: "Accessories"))
          clothing_categories.append(clothing_category(name: "Pants"))
          clothing_categories.append(clothing_category(name: "Color"))
          clothing_categories.append(clothing_category(name: "Tops"))
          clothing_categories.append(clothing_category(name: "Dressing for an Occaision"))
  
          // Uncomment the following line to preserve selection between presentations
          // self.clearsSelectionOnViewWillAppear = false
  
          // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
          // self.navigationItem.rightBarButtonItem = self.editButtonItem()
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      // MARK: - Table view data source
  
      override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
          return 1
      }
  
      override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          // #warning Incomplete implementation, return the number of rows
          return clothing_categories.count
      }
  
      // Table view cells are reused and should be dequeued using a cell identifier.
      let cellIdentifier = "categoriesTableViewCell"
  
  
      override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("cellIdentifier", forIndexPath: indexPath) as! catgeoriesTableViewCell
         //Fetches the appropriate clothing_catgeory for the data source layout.
          _ = clothing_categories[indexPath.row]
          **cell.nameclothing_category.text = clothing_category.name**
          return cell
  
      }
  </code></pre>
  
  <p>How can I resolve this problem?</p>