I am implementing custom UIViewController
subclasses that emulate behaviours of UITabBarController
and UINavigationController
.
I would like to make these classes general enough so that any UIViewController
can be used. One problem that I ran into is that the property parentViewController
(as well as navigationController
) is read only.
(Aside: One motivation for setting parentViewController
is for the correct behaviour of -presentMoviePlayerViewControllerAnimated:
. UIViewController seems to pass it onto parentViewController, if set.)
Using KVC method setValue:self forKey:@"parentViewController"
seems to work, but could this get my app rejected? Has anyone done anything similar?