I am thinking about asking this question from sometime..
Now I am finally asking it..
When I say …in the tableView datasource… that..
cell.textLabel.text=[myArray ObjectAtIndex:indexPath.row];
what does it actually mean?? can anyone translate it for me from machine language??
I am using it a lot but ..I think I actually dont know what it does inside??
UITableViewCell(cellis object of this class) has fewsubviewsadded on it, one of them is referred bytextLabel.textLabelisUILabelobject and it is declared as property inUITableViewCellso that we can access it usingUITableViewCellobject.textis property ofUILabelwhich helps to settextapearing on label. So cell gives youUITableViewCellthen you accesstextLabeland set itstextproperty.[myArray objectAtIndex:indexPath.row];is call for accessing an object from array(myArray) with given index. Here myArray should returnNSStringas its object so that it could be set astextoftextLabel.objetAtIndexis method that will return you array element located at given index. as we do for examle in C ,myArray[0]---> [] bracket is for our (primitive type) data retrieval at given index in bracket.In
object-cyou have this method,objectAtIndex:(defined forNSArray), does the same work.indexPath.rowdenotes we are accessingrowproperty ofindexPath(NSIndexPathobject)[similarly it has section property ] . and" . "is operator for accessing the properties.more detailed insights are available in apple documentation.
Thanks,