You start with a rather complicated project - very impressed. Here are some quick notes on storyboards and segues.
if you configure the storyboard using the view controller, then configure segue to a different view controller. When you create a new view controller, the original is still in memory and can respond to notifications or callbacks if you program it this way.
, -:
- , , , a. networkMethod . , , , b, - . , , , - . , , .
- b. .h
#import "ViewControllerB.h"
a ( .h) :
@property (nonatomic, strong) ViewControllerB *viewB;
.m , segue - , - . , :
[self performSegueWithIdentifier:@"viewB" sender:self];
, :
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
self.viewB = segue.destinationViewController;
}
b :
-(void)networkCallbackMethod:(NSString*)stringData {
if (self.viewB) {
[self.viewB myCustomMethodUsingPassedData:stringData];
}
}
, , b :
-(void)myCustomeMethodUsingPassedData:(NSString*)stringData {
}
, , segue , .
, . .