开发者

Why can’t UIImagePickerController be pushed into navigation stack?

When using pushViewController to push UIIm开发者_开发知识库agePickerController:

[self.navigationController pushViewController:pvc animated:YES];

an error will occur such as:

Pushing a navigation controller is not supported

The right solution is to use presentModalViewController:

[self presentModalViewController:pvc animated:YES];

Can someone explain why this is necessary? What‘s hidden in UIViewController?

Thanks!


Apple does not allow stacking of navigation bars. Since the image picker has its own navigation bar, it cannot be placed in a navigation stack. The result would cause user confusion since there would be two bars, two sets of navigation items, two titles, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜