The parentViewController property of UIViewController is readonly, but I am nesting custom view controllers and would like to use this property.
However, since it is re
Solution is:
- (void)setParentController:(UIViewController*)parent{
[self setValue:parent forKey:@"_parentViewController"];
}
It does not cause problems with linker!
PS: Don't use "setParentViewController" as method name, because this method exists in private API and Apple say: "The non-public API that is included in your application is setParentViewController:.
If you have defined a method in your source code with the same name as the above mentioned API, we suggest altering your method name so that it no longer collides with Apple's private API to avoid your application being flagged with future submissions.
Please resolve this issue in your next update..."