kevin-lyn / STPopup

STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.
MIT License
2.6k stars 345 forks source link

Issue while running tests with STPopup #6

Closed amayne closed 9 years ago

amayne commented 9 years ago

After adding STPopup to my app, I am unable to run tests properly. I seem to be getting a stack overflow with a recursive function call to st_parentViewController, here:

- (UIViewController *)st_parentViewController
{
    if (!self.popupController) {
        return [self st_parentViewController];
    }
    return [[self.popupController valueForKey:@"containerViewController"] parentViewController];
}
screen shot 2015-09-21 at 7 08 01 pm

I'm scratching my head trying to figure out why this is happening, but right now unable to test when the library is included. The library works perfectly in the app. Any help would be great!

kevin-lyn commented 9 years ago

@amayne are you using any test framework?

kevin-lyn commented 9 years ago

@amayne I tried to replicate this issue by running unit test with STPopup, but everything is working well.