ios - Core Data - How to access entity attribute? -
i have 2 entities. athlete , eval. athlete has to-many relationship eval. athlete can have multiple evals eval can have 1 athlete. first view controller displays table view controller athlete. display athletes. when click on athlete takes table view controller displays evals athlete. how can display attributes eval @ top of evalarray[0] in athlete table view?
this have far:
allevals.h
eval *mostrecenteval = evalarray.firstobject; allathletes *allathletes = [self.storyboard instantiateviewcontrollerwithidentifier:@"allathletes"]; allathletes.evallastupdated = mostrecenteval.date_recorded; nslog(@"%@",mostrecenteval.date_recorded);
when log it, correctly displays attribute, when go athletes, log again when view appears, says (null). can tell me why?
in athletes view controller, inside tableview:cellforrowatindexpath:
, athlete
row, eval
objects , sort them date (however building eval array) , recent 1 , use populate label on athlete table view cell.
Comments
Post a Comment