Pass Core Data Entity Attribute From ViewController A to B
I have small problem with Core Data. I will skip the code because it's
working fine. I just need to know what to do inside prepareForSeague
method.
App has 2 Views - ViewControllerA and TableViewControllerB. In
TableViewControllerB I've set up table view with custom cell with cell
identifier: customCell. I press button ADD and it shows Alert view with 2
rows. Alert View adds 2 Attributes to entity and these attributes are
displayed in table cell. Entity is called SOMEentity while Attributes are
name (NSString) and value (NSString also).
View controller A has two textFields: TextFieldA and TextFieldB, a button
calculate and label called calculateLabel. Calculate button simply adds
values from textFields.
Now I want to do this - clicking on cell will display Attribute Value in
TextFieldA.
what do I have to do inside
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender;
{
if ([[segue identifier] isEqualToString:@"FromViewBToViewA"]) {
}
}
Also, do I have to write something inside viewDidLoad method in
ViewControllerA? all strings and labels have nonatomic, strong properties.
Thanks!
No comments:
Post a Comment