title: How to access NSObject class/instance variable from view controllers?
body: <p>I want to pass a <code>NSString</code> value to a class method of a NSObject class: <code>+(void)loadTableData:(myCompletion) compblock;</code>. So I can only use a class variable <code>NSString *categoryID</code> for use in the class method. I declare it in the <strong>.h</strong> file trying to let it also be used for public access. But I tried many ways, and can only declare it like below. Other positions will give me warning.</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  typedef void(^myCompletion)(NSArray *);
  NSString *categoryID;
  
  @interface ThirdVCLoadTable : NSObject
  + (void)loadTableData:(myCompletion) compblock;
  @end
  </code></pre>
  
  <p>Then the problem is <strong>I am still not able to access it in my view controller class</strong>. The error message is always: <strong>Property "categoryID" not found on object of type "ThirdVCLoadTable"</strong>, no matter what I try in order to access the <code>NSString *categoryID</code>.</p>
  
  <p>For example,</p>
  
  <pre><code>ThirdVCLoadTable *load = [[ThirdVCLoadTable alloc] init];
  load.categoryID = [NSString stringWithFormat:@"%li", (long)indexPath.row + 1];
  </code></pre>