title: Iterate/Loop through all properties of a class in Objective C
body: <p>Possible duplicate: <a href="https://stackoverflow.com/questions/9252147/objective-c-looping-through-all-properties-in-a-class">Looping through properties in a class</a></p>
  
  <p>The problem is I have number of UILabels on each row upon a UITableView and I need to map the properties of my model class (which are of course NSStrings) to the label titles.</p>
  
  <p>As there are multiple labels(More than 12, and it might increase later in my project), hence I was using a for loop to allocate all the labels. But for mapping the variables to the labels I have to hard code each time for the corresponding label.</p>
  
  <p>Is there any way loop through all the properties of an class, so that I can declare them in an order and fetch them as an array and map it properly.</p>
  
  <p>I have seen and understood the above possible duplicate link but it populates the code with as many switch cases as many times it is required to set. Instead of that is there any other alternative for concise and more clear coding using a loop.</p>
  
  <p>Any help would be appreciated.
  Happy coding.</p>