Could UINavigationControllerWillShowViewControllerNotification get my app rejected?
I'm observing UINavigationControllerWillShowViewControllerNotification
on UINavigationController
to keep track when the current view controller has been popped, as suggested on this post.
There's literally no reference anywhere for that notification and a Google search will link me only to that post.
Does it mean this is a private notification and my app could be rejected?
Even worse: does it mean I shouldn't trust how that notification works as it might break 开发者_如何转开发in a future SDK version?
The notification in question is actually implicitly referenced in the documentation:
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
Delegate methods are, at least in Cocoa for Mac OS X usually accompanied by a notification (well, often times, anyway).
As it stands it's an undocumented feature, and as such should be treated with care. If possible, use the delegate method instead.
However: If it appears in the header, and it works, and it is accompanied with a delegate method; it is possible that this is a documentation oversight on Apple's side; and that using it is safe.
I recommend filing a bug and see where that gets you; at least if restructuring your application to use a delegate directly would be overly cumbersome (more cumbersome than filing a bug).
精彩评论