Skip to content

OUIViewController asserts precondition unretained_prospective_parent? #74

Description

@memmons

In OUIViewController there is an OBPRECONDITION that requires unretained_prospective_parent to not be nil (see below). However, this will be nil in some cases. For example, using an OUIScalingViewController subclass in a view controller embedded in a nav controller via storyboard. In this case, willMoveToParentViewController is never called, which is where _unretained_prospective_parent is initially being set.

- (void)didMoveToParentViewController:(UIViewController *)parent;
{
    DEBUG_PARENT_VC(@"In %s with parent: %@", __func__, parent);
    OBPRECONDITION(parent == _unretained_prospective_parent);
    ...
    _unretained_parent = parent;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions