my iOS application use storyboard
it have 2 view controllers: - main storyboard view controller - and popover view controller with some objects in it
i've got a button on main view controller and it creates programing every time i run the application:
*CGRect buttonFrame = CGRectMake(10., 10., 120., 50.);
oneButton = [UIButton buttonWithType:UIButtonTypeCustom];
[oneButton setImage:[UIImage imageNamed:[NSString stringWithFormat:@"someImage.png", img]] forState:UIControlStateNormal];
[oneButton setTag:img];
[oneButton setFrame:buttonFrame];
[oneButton addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:oneButton];*
the action of this button show my popover view like that:
*- (void) pressButton:(id)sender {
popoverViewController *popoverFrame = [self.storyboard instantiateViewControllerWithIdentifier:@"myPopoverView"];
popoverWithObjects = [[UIPopoverController alloc] initWithContentViewController:popoverFrame];
[popoverWithObjects presentPopoverFromRect:[sender frame] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];
}*
from now the situation is, that i can't send to my button any message or result.
i want to say to my program button (note - i've got only sender of this button action:@selector(pressButton:)
) that popover return some result or some action of an object in popover send anything (string for example)
Or in another words when i interact with any object like button on popover view, i want to change parent buttons title label