I created UIViewController( AnestDrugCalcViewController) which has a button that opens UITableViewController( DrugTableViewController) to select the medicine. DrugTableViewControllerIt is filled on the basis NSMutableArrayand consists of several objects NSDictionary(drugName, drugDose, drugConcentration, etc.).
I can open DrugTableViewControllerit by clicking on the navigation stack, but I can’t figure out how to say from mine AnestDrugCalcViewControllerthat the properties of the selected item.
#import <UIKit/UIKit.h>
@interface DrugTableViewController : UITableViewController {
NSMutableArray *drugList;
NSIndexPath *lastIndexPath;
IBOutlet UITableView *myTableView;
NSObject *selectedDrug;
}
@property (nonatomic, retain) NSArray *drugList;
@property (nonatomic, retain) UITableView *myTableView;
@property (nonatomic, retain) NSObject *selectedDrug;
@end
Top of DrugTableViewController.m #import "DrugTableViewController.h"
@implementation DrugTableViewController
@synthesize drugList,myTableView, selectedDrug;
source
share