I can not understand what is happening.
I am creating an iPhone application that uses a paging scroll. There are several views in the scroll view whose view controllers are loaded from the storyboard, calling:
[self.storyboard instantiateViewControllerWithIdentifier:@"identifier"];
I add view controllers to the mutable array and add their views to the scroll view as subzones. After appearing on the screen, the view controllers are freed, so the targeted actions no longer work.
When I included Zombie objects, the debugger wrote this when sending actions to the controller:
*** - [StreamingViewController performSelector: withObject: withObject:]: message sent to the freed instance 0x914f0e0
I really tried to fix it, but to no avail, so every help is greatly appreciated.
Another code:
StreamingViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Streaming View Controller"];
[self.pageControllers addObject:controller];
controller.view.frame = self.scrollView.frame;
[self.scrollView addSubview:controller.view];
source
share