I have one view controller (AViewController) and there I have table.
In that controller I have added another view controller view as a subview (BViewController):
BViewController *barCodeScanner = [[BViewController alloc]init];
[self.view addSubview:barCodeScanner.view];
BViewController has a delegate and one delegate method in it and it works.
But I want to refresh table on AViewController.
So I moved delegate to AViewController and try to change delegate code from:
rdr.readerDelegate = self;
to
rdr.readerDelegate = AViewController;
but it doesn’t work. Why?
You need to create an instance for AViewController and set it as a delegate to
rdr: