Re: Properties being set to nil?
Jon Gotow
Oh - there you go. Assuming that myGameWindowController is the parent window controller that manages myGameViewController, it will create an instance of your LTWMacGameViewController class when it loads. Calling [myStoryboard instantiateControllerWithIdentifier:kLTWGameMainViewControllerID] afterwards will create another instance of LTWMacGameViewController that's just floating in memory, not referenced by the window controller.
toggle quoted message
Show quoted text
What you want to do is get the instance of LTWMacGameViewController that's managed by the window controller. Do this instead: myGameViewController = myGameWindowController.contentViewController; That'll fix it. - Jon On Jan 16, 2020, at 11:38 AM, Dave <dave@...> wrote: |
|