I have to send parameters between two UIView. This is how I’m loading the second UIView from the first:
SingleViewController *single = [[SingleViewController alloc] initWithNibName:@"SingleViewController" bundle:nil];
[self.view addSubview:single.view];
How can i send some NSString to the other view?
If I understand you correctly, then I think you would send the NSString to the view controller (single) and not the view (single.view).
Two common ways to do this come to mind. Set up a property for SingleViewController class in it’s .h file using @property, and then either:
1. set the property like
or 2. Create a new init method for SingleViewController and pass it in that way.
where you have declared
initWithMyString:withNibName:bundle: in yourSingleViewController.hfile and in it you callinitWithNibName:bundle: for the parent class.