microsoft / WinObjC

Objective-C for Windows
MIT License
6.24k stars 808 forks source link

[pushViewController:animated:] never sent to UINavigationController on [initWithRootViewController:] #1170

Open ghost opened 8 years ago

ghost commented 8 years ago

Given a programatically created (non- Interface Builder) view controller:

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    //
    MyViewController* viewController = [[MyViewController alloc] init];

    UINavigationController* navigationController =
        [[UINavigationController alloc] initWithRootViewController:viewController];

    self.window.rootViewController = navigationController;
}

UINavigationController [initWithRootViewController:] should call [pushViewController:animated:] on its own instance (self, UINavigationController). In WinObjC the message is never sent.

Related: issue 1159.

As of: WinObjC version 0.2.160927 (September 27, 2016).

ArnOmsft commented 8 years ago

Thanks for the feedback. We won't be able to address this in the short term but you should consider submitting a pull request for this if you'd like to contribute to the project.